Skip to content

Commit 12dc9c4

Browse files
only21milclaude
andcommitted
docs: banner consumers style only their own content
ComposerPlanFollowUpBanner.tsx puts text classes on its own spans, so the ui-consistency rule that consumers have "no styling of their own" flagged the example it cites. Say consumers style only their own content and leave banner styling to the slots, and say the same in web-ui.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent b866f8f commit 12dc9c4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.macroscope/check-run-agents/ui-consistency.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The reference for how this codebase wants UI built is the composer banner system
4444

4545
- `ComposerBanner.tsx` exports one object of small slot components (`Root`, `Row`, `Icon`, `Content`, `Actions`, `Dismiss`, `Children`, and so on). Each slot owns its own Tailwind classes, exposes a `data-slot` attribute, takes `className` and spreads the rest of its props, and uses `cn` so callers can adjust without overriding. Variants and density are props on `Root`, not ad hoc class strings at call sites. Where a slot needs a real control it renders `Button` from `ui/` rather than a styled `<button>`.
4646
- `ComposerBannerStack.tsx` composes those slots into the ordered stack and owns only stack behavior (priority, expand and collapse, dismiss transitions).
47-
- Consumers such as `ComposerPlanFollowUpBanner.tsx` are a few lines of `<ComposerBanner.Row><ComposerBanner.Icon/><ComposerBanner.Content>…` with no styling of their own.
47+
- Consumers such as `ComposerPlanFollowUpBanner.tsx` are a few lines of `<ComposerBanner.Row><ComposerBanner.Icon/><ComposerBanner.Content>…` and style only their own content.
4848

4949
Hold new and changed UI to that shape:
5050

‎docs/internals/web-ui.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The composer banners are the reference.
3131
renders `Button`.
3232
- [`ComposerBannerStack.tsx`](../../apps/web/src/components/chat/ComposerBannerStack.tsx) composes
3333
the slots and owns only stack behavior: priority, expand and collapse, dismiss transitions.
34-
- Consumers are a few lines of slots, and the slots carry the styling:
34+
- Consumers are a few lines of slots, and the slots carry the banner styling:
3535
[`ComposerPlanFollowUpBanner.tsx`](../../apps/web/src/components/chat/ComposerPlanFollowUpBanner.tsx).
3636

3737
Build new UI the same way. Compose or extend a component instead of copying its markup and classes.

0 commit comments

Comments
 (0)