Repository navigation
feat(Timeline): cascade color to indicator Avatar - #31
IgorShevchik wants to merge 1 commit into
Conversation
2788cda to
d8679cd
Compare
The existing top-level `color` prop now also tints the indicator `B24Avatar` of every item. An explicit `item.avatar.color` still wins, since `v-bind="item.avatar"` is applied after `:color="props.color"`. `Timeline.variants.color` is a strict subset of `AvatarProps['color']` (only `air-primary*`), so the binding casts to the Avatar color type at the template site. Existing `with air-primary color` snapshot is updated to reflect the new indicator style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d8679cd to
d556d22
Compare
|
Closing this. It belongs with #29 (Alert) and #30 (Toast) — a container-level cascade — and it has one problem those two do not: it does not add a colour to the indicator, it removes a distinction the theme already makes. The indicator is already coloured by the timeline, per state. The colour variant writes Binding It also changes what existing code renders. And, as with Toast, there is no non-filled colour to fall back on. Upstream does not do this either — If the indicator's colouring is genuinely wrong for some state today, that is a fix in Of this series, #27 is the one that landed: Nothing was committed while investigating. Generated by Claude Code |
Summary
colorprop onB24Timelinenow also tints the indicatorB24Avatarof every item.item.avatar.colorstill wins, sincev-bind="item.avatar"is applied after:color="props.color".Timeline.variants.coloris a strict subset ofAvatarProps['color'](onlyair-primary*), so the binding casts to the Avatar color type at the template site. No API change, no theme change.renders with air-primary color correctlysnapshot is updated: the indicator span now rendersstyle-filledinstead ofstyle-outline-no-accent.renders with color and avatar correctlysnapshot witnesses the cascade with avatar items.Follow-up to #24 (Avatar/AvatarGroup
color), #27 (User), #28 (ChatMessage), #29 (Alert), #30 (Toast).Test plan
pnpm run lintpassespnpm run typecheckpassespnpm run testpasses — Timeline snapshots witness the cascadeitem.avatar.coloroverrides the cascade🤖 Generated with Claude Code