Skip to content

Component gallery + components guide (plan PR 5) - #98

Merged
mapgie merged 1 commit into
claude/memos-shared-layerfrom
claude/component-gallery-guardrails
Aug 22, 2026
Merged

Component gallery + components guide (plan PR 5)#98
mapgie merged 1 commit into
claude/memos-shared-layerfrom
claude/component-gallery-guardrails

Conversation

@mapgie

@mapgie mapgie commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Implements PR 5 (final) of the UI component-system plan (docs/ui-component-system-plan.md, from #94). Stacked on claude/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: @Preview composables 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, the Dimens/opaque-container/one-StatusTone-vocabulary/Role rules, and the checklist for adding a component.

On the "guardrails"

The plan's success criteria ("no Card( outside core/", "no hardcoded .dp in screens") are documented in the README rather than enforced by a new CI script: a Card( regex collides with DashListCard(/ChoreCard( call sites, and screens still legitimately use .dp (icon sizes, list bottom padding), so a strict script would false-positive today. The @Preview gallery plus the existing a11y_check.py are 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).
  • Changelog fragment component-gallery-guardrails.json (patch, internal-only note).

This container has no Android SDK, so the app is not compiled locally; CI is the build check.

🤖 Generated with Claude Code

https://claude.ai/code/session_011bvGtNaiY6zFyB2w4fTVAf


Generated by Claude Code

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
@mapgie
mapgie marked this pull request as ready for review August 22, 2026 09:36
@mapgie
mapgie merged commit ac8a9bc into claude/memos-shared-layer Aug 22, 2026
@mapgie
mapgie deleted the claude/component-gallery-guardrails branch August 22, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants