Add corner indicator dot to ReqoreButton#580
Merged
Merged
Conversation
Adds an `indicator` prop that renders a small dot in a corner of the button to signal importance or a pending event. Accepts `true` for a static danger-tinted dot, or an object to customize `intent`/`color`, enable an expanding-fade `pulse` animation, and pick the `position`. - New IReqoreButtonIndicatorProps + StyledButtonIndicator (transient props) - INDICATOR_SIZE_TO_PX added to constants/sizes.ts (scales with button size) - Indicator story (intents, pulse, positions, sizes) + unit tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
qlip visual regression🔍 7 changed, 1 new of 14 snapshots. |
ReqorePopover extended the customTheme contract (via IReqoreComponent) but never destructured the prop, so it was swallowed and the trigger component missed the surrounding theme cascade — unlike every other panel/action item that inherits it. Destructure `customTheme` and forward it to the trigger `Component` on both render paths, letting a caller-supplied `componentProps.customTheme` win. Adds a regression story asserting the themed trigger's resolved surface differs from an unthemed control (proving the theme reached the trigger) and that a per-trigger override stays distinct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adds an
indicatorprop toReqoreButtonthat renders a small dot in a corner of the button to signal importance or a pending event (unread items, a required action, a live status). It is distinct from the existingbadgeprop, which renders content tags inside the button.API
Details
coloroverride.pulseadds a::afterring that scales1 → 2.6while fading to 0 opacity on a 1.6s loop.INDICATOR_SIZE_TO_PXmap inconstants/sizes.ts, so the dot scales with the buttonsize.$-prefixed) props;aria-hiddensince it's decorative.Note on clipping
StyledButtonhasoverflow: hidden(needed for the animated label + rounded corners), so the dot is inset slightly from the corner rather than overhanging. The pulse ring's outermost edge is clipped by ~1px at the corner, but that edge is already near-zero opacity so it isn't visible in practice.Testing
Indicatorstory: intents, custom color, pulse on/off, all four positions, all sizes.yarn test(690),yarn test:stories Button(21), lint, and typecheck all pass.🤖 Generated with Claude Code