add GitHub themes, document single card theming, light/dark cards in docs - #457
Open
martin-mfg wants to merge 8 commits into
Open
add GitHub themes, document single card theming, light/dark cards in docs#457martin-mfg wants to merge 8 commits into
martin-mfg wants to merge 8 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Member
Author
|
Backend E2E test fails because of the problem described in #459. |
This was referenced Aug 8, 2026
marcalexiei
reviewed
Aug 8, 2026
marcalexiei
left a comment
There was a problem hiding this comment.
Opened #462 with few fixes and improvements
Found while reviewing #457. 1. Dark themes rendered a near-white border. `dark_github` / `dark_github_repocard` had no `border_color` and fell back to the default theme's `e4e2e2`. Set GitHub's borders on all four new themes: `d1d9e0` light, `3d444d` dark. 2. Excluding `default` / `default_repocard` broke the theme picker. `Home.tsx` initializes to one of them and treats it as "emit no `theme=` param", so stage 3 opened with nothing selected and the theme-less URL became unreachable. 3. Paired themes were shown for the wrong card type. The picker now takes `isRepoCard` and lists only the matching variant, hiding duplicates while keeping each card type's `default` visible. 4. Theme README generator only knew the `default` pair, so the new themes would land in the wrong tables. 5. 3 and 4 share a rule, kept duplicated on purpose: which themes to advertise per card type is presentation, not rendering, so it stays out of core's API. Both copies carry `Keep in sync` comments pointing at each other. 6. Dead docs anchor left by the `Responsive Card Theme` ➡️ `Light and Dark Mode` rename. 7. Core gains one export: the `ThemeName` type, replacing the private duplicate `ThemeNames` in `cards/types.ts` and the `keyof typeof themes` casts in `color.ts` and the picker.
Member
Author
|
I have merged your suggestions unchanged, then added 1 commit on top with new changes from me. |
marcalexiei
reviewed
Aug 9, 2026
marcalexiei
left a comment
There was a problem hiding this comment.
- Opened #464
- replace
isRepoCardbooleanwith aCardCategorytype - refined return type of
getDefaultThemeusing the newThemeNametype
- replace
…gory (#464) Two places independently hardcoded the same "is this a repo or gist card?" check: - `Home.tsx`: which theme variant to default to - `Customize.tsx`: whether to offer "Show Owner?" Both now derive it from one map in `models/CardType.ts`: ```ts export const CardCategory = { REPO: "repo", USER: "user" } as const; export const CATEGORY_BY_CARD_TYPE: Record<CardType, CardCategory> = { ... }; ``` A new card type won't compile until it's categorised, instead of silently falling into the non-repo branch like the boolean did. It also leaves room for another category, if we ever need one that changes the data a card requires. Also: - `ThemeStage` takes `category` instead of `isRepoCard`. - `getDefaultTheme` / `onThemeChange` use core's `ThemeName` instead of `string`.
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.
light_github,dark_github,light_github_repocard,dark_github_repocardwhich exactly match GitHub's colors(I wonder why the existing themes don't match GitHub's colors. They also didn't back when they were added.)
Note
Even after approval this PR should only be merged shortly before creating a new release. This avoid documenting a non-released feature, and also the usage of the new themes in our docs before they actually work. After the release I should check that the theming then works correctly in our docs.