feat: canonical theme picker and repo remotes - #3
Merged
Merged
Conversation
Adopt the Keel theme picker as canonical (family-grouped site themes with menu-title headings, short Catppuccin labels, curated code themes via CODE_THEME_OPTIONS/codeThemeOptions) and derive ScmMenu links from RepoConfig.remotes or a single Source link for repo.url. ScmMenu renders one link as an icon link and several as the popover menu.
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
ThemePicker.astroadopts the Keel switcher look — a compact popup with<ul class="menu menu-sm">, onemenu-titleper site-theme family (viagroupChromeThemes), swatch dots, and short Catppuccin labels. Code themes are now the curated list fromCODE_THEME_OPTIONS/codeThemeOptions(config)instead of every site theme. The chrome preference contract (data-pref,data-label,kdc:*,applyPrefs/syncControls,data-theme/data-code-theme,follow) is unchanged.RepoConfiggainsremotes?: FooterLink[].defineDocsChromederivesscmfromrepo.remotes(deduplicated byhref, order preserved) or a single{ label: 'Source', href: repo.url }; explicitscmstill wins.ScmMenurenders one link as a single icon link and several as the existing popover menu.Changelog
Added
CodeThemeOption,CODE_THEME_OPTIONS(followplus the Catppuccin flavours, Nord and the Kolektiv palettes) andcodeThemeOptions(config), which restricts the list to the themes a site offers (sothemeFamiliesapplies) and appends anyconfig.themes.ThemePickerrenders site themes grouped by family — onemenu-titleper family, Catppuccin shown by flavour (for exampleMocha) — with the curated code themes belowfollow.RepoConfig.remotes(FooterLink[]). When supplied,defineDocsChromederivesscmfrom it, deduplicated byhrefand order-preserving; otherwise it derives a single{ label: 'Source', href: repo.url }. An explicitscmstill wins.deriveScm(repo)is exported.Changed
ScmMenurenders a single icon link when the deduplicatedscmlist has one entry (previously it always opened a popover); several links keep the popover menu and zero links render nothing.defineDocsChromeno longer emits the duplicateSource/yuri.capitalpair forrepo.url.Verification
pnpm test,pnpm typecheck,pnpm build, playground build all pass.