Registry UI: fix theming bugs and small UX polish#1474
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Small, low-risk UI/UX improvements to the registry web views and a new
npm run previewscript for previewing them locally. No interaction model changes.Bug fixes (
src/registry/views/static/style.ts)--color-text-defaultwith--color-text-primaryon.componentRow .title .nameand.componentRow .release(component name and version were silently falling back to inherited color).--color-infowith--color-text-secondaryon.author..filters inputno longer hard-codescolor: #0f0f23; background-color: #eee;— filter inputs were broken in dark mode. Now uses the themed tokens.@media (min-width: 1024px) { margin-left: 15px; }block with no selector inside..info-itemdisplay: flow(not a valid CSS value) →display: flex, so thealign-items: startactually applies on desktop.Aesthetic polish (same file)
.stats-badgemini-chart bars now use three shades of brand indigo (--color-primary-light/--color-primary/--color-primary-dark) instead of unrelated green/red/blue.--color-border-hoverwith--color-primaryon hover, instead of the indigo→cyan gradient swap..empty-stateclass for themed empty-state messages.UX improvements
src/registry/views/partials/components-list.tsxautofocusfrom the search input (it was stealing focus and scrolling on every navigation, including back/forward and mobile).aria-labelto both filter inputs (placeholder-as-label is a common a11y issue).src/registry/views/static/index.tssafeRegExphelper so invalid patterns ([,c++, etc.) no longer throw an uncaughtSyntaxErrorand break filtering.history.replaceState, so refresh and back/forward preserve the selected tab..empty-stateclass instead of inlinecolor: #64748b.Tooling
npm run preview→bun run preview/uiPreview.ts. Serves the mocked home and info views on http://localhost:4444 with auto-reload, using the existingpreview/uiPreview.ts+preview/fakeVM.ts.Verification
Local checks against
npm run preview:/) and info (/:name/:version/~info) both return HTTP 200.--color-text-default,--color-info,display: flow,background-color: #eee,rotate(180deg),new RegExp(s), inlinecolor: #64748b; padding: 2em.empty-state,rotate(15deg),aria-label="Filter by component …",safeRegExp,history.replaceState,debounce(.Files changed