Component gallery + components guide (plan PR 5) - #98
Merged
mapgie merged 1 commit intoAug 22, 2026
Conversation
PR 5 of the UI component-system plan (docs/ui-component-system-plan.md). - ui/components/core/Gallery.kt: a set of @Preview composables rendering the three card bindings and every core primitive side by side, in light/dark, zen, and high-contrast. The Storybook analogue: one place to see drift in review. Preview-only; nothing ships in the running app. - ui/components/README.md: documents the rule the layer exists to enforce - screens compose components, screens do not draw - plus the layout, the opaque-container and one-status-vocabulary rules, and how to add a component. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011bvGtNaiY6zFyB2w4fTVAf
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.
Implements PR 5 (final) of the UI component-system plan (
docs/ui-component-system-plan.md, from #94). Stacked onclaude/memos-shared-layer(PR 4); the diff here is PR 5 only. GitHub retargets down the stack as each PR merges.Changes (new files only)
ui/components/core/Gallery.kt— the Storybook analogue:@Previewcomposables rendering the three card bindings and every core primitive (OwnerAvatar,CategoryBadge,SourceChip,ListSectionHeader,CollapsibleSectionHeader,DashScreenHeader,DashEmptyState) side by side, across light / dark / zen / high-contrast. One place to catch drift in review. Preview-only — nothing ships in the running app.ui/components/README.md— documents the rule the layer exists to enforce: screens compose components; screens do not draw. Plus the folder layout, theDimens/opaque-container/one-StatusTone-vocabulary/Rolerules, and the checklist for adding a component.On the "guardrails"
The plan's success criteria ("no
Card(outsidecore/", "no hardcoded.dpin screens") are documented in the README rather than enforced by a new CI script: aCard(regex collides withDashListCard(/ChoreCard(call sites, and screens still legitimately use.dp(icon sizes, list bottom padding), so a strict script would false-positive today. The@Previewgallery plus the existinga11y_check.pyare the enforced guardrails. The optional debug-only gallery route off Settings is left out to avoid touching the nav/Settings surface; the previews cover the need.Checks
python3 a11y_check.py— clean (89 files).component-gallery-guardrails.json(patch, internal-only note).🤖 Generated with Claude Code
https://claude.ai/code/session_011bvGtNaiY6zFyB2w4fTVAf
Generated by Claude Code