feat(time): add Time atom component#259
Open
FranRubioDev wants to merge 1 commit into
Open
Conversation
egdev6
requested changes
Jun 5, 2026
Member
egdev6
left a comment
There was a problem hiding this comment.
Thanks for the Time atom work. I’d request changes before merge because a few issues currently break the component contract and user-facing behavior.
Blocking items to fix:
Timeis not exported fromsrc/index.ts, so package consumers cannot import it from@stack-and-flow/design-system.handleContainerClickrefocuses Hours for any click inside the wrapper, so clicking Minutes/Seconds/AM-PM does not keep focus on the clicked segment.- 12h mode is not safe yet: the AM/PM segment is treated as free text / numeric stepping and can become invalid values like
1instead ofPM. onChangecan emit stale or unclamped values because the callback uses the raw value/old segment snapshot instead of the normalized next state.- Storybook docs need to follow the repo convention: JSDoc above
const metaand each story, notparameters.docs.description.component.
Please add focused regression tests for segment click focus, AM/PM keyboard/input behavior, and normalized onChange payloads. Also update the PR evidence once the component audit and visual review are addressed.
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 the
Timeatom component — a segmented time input supporting 12/24h, minute/second granularity, steppers, clock icon, and floating label.Closes #37
Review scope
src/components/atoms/time/Type of change
Workflow gates
Closes #NNNor maintainer approved an exception.status:approvedbefore implementation starts.In progress, branch/worktree recorded.<type>(<optional scope>): <description>..playwright-mcp,page-*.png,page-*.jpeg,*.md.playwright-output.Component evidence (required for component changes)
types.ts,use*.ts,Component.tsx,Component.test.tsx,Component.stories.tsx,index.ts.types.ts; JSX component has no state, CVA calls, or business logic.@defaultJSDoc intypes.ts(node scripts/verify-prop-default-docs.mjs).theme.css; no hardcoded colors or arbitrary color utilities.Accessibility evidence
Changes
src/components/atoms/time/types.ts@defaulttagssrc/components/atoms/time/useTime.tssrc/components/atoms/time/Time.tsxsrc/components/atoms/time/Time.stories.tsxsrc/components/atoms/time/Time.test.tsxsrc/components/atoms/time/index.tsValidation evidence
pnpm exec tsc --noEmit— passes