feat(Progress): add new component/composable#180
Merged
johnleider merged 49 commits intomasterfrom Apr 6, 2026
Merged
Conversation
|
commit: |
…eProps - Rewrite createProgress to use createRegistry with reactive option instead of manual Map + triggerRef management - Replace ProgressSegment type with ProgressTicket extending RegistryTicket - Use mergeProps(attrs, slotProps.attrs) in all component templates - Use style array [attrs.style, slotProps.attrs.style] for Fill/Buffer - Make ProgressLabel id a prop with useId() default - Remove unused useProxyModel import from ProgressRoot - Remove onBeforeUnmount cleanup from Root (registry handles disposal) - Remove inline section comments from ProgressRoot
Replace manual segment management in ProgressRoot with the established createModel + useProxyModel pattern used by Slider. The composable now extends createModel with multiple:true and events:true, overriding register/apply/selectedValues. ProgressRoot is significantly simpler — just creates the composable, normalizes v-model, and calls useProxyModel.
…ster conventions - Remove percent from ProgressTicket — add fromValue() to context instead (matches Slider) - Add id prop to ProgressRoot with useId() default (matches SliderRoot, DialogRoot) - Derive labelId from root id (matches Dialog titleId/descriptionId pattern) - Match Slider's register signature: isObject(input) ? input.value : input - Re-declare value on ProgressTicketInput as required (matches SliderTicketInput) - ProgressLabel reads root.labelId directly, no mutable ShallowRef
- Remove ProgressTicket type alias, use ModelTicket<ProgressTicketInput> inline - Remove generics from createProgress (matches Slider — not designed for extension) - ProgressOptions is standalone (doesn't extend ModelOptions) - Use ticket.unregister() instead of root.unregister(ticket.id) - Remove redundant isUndefined check in scalar detection - register uses isObject(input) matching Slider exactly
…om ProgressContext
# Conflicts: # apps/docs/src/typed-router.d.ts
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
createProgresscomposable — registry-based segment tracking with value-driven indeterminate mode, total/percent computation, and trinity pattern for DIProgressheadless component tree: Root, Track, Fill, Buffer, Value, Label, HiddenInputrole="progressbar"compliance (determinate + indeterminate modes)Components
Progress.Rootnumber | number[]), provides ARIA attrsProgress.TrackProgress.FillProgress.BufferProgress.Value${percent}%by default, overridable via scoped slotProgress.Labelaria-labelledbyto RootProgress.HiddenInputnameprop setKey features
Fillchildren auto-register, each with independent value/percentSpec & Plan
docs/superpowers/specs/2026-04-03-progress-design.mddocs/superpowers/plans/2026-04-03-progress.mdTest plan
pnpm build:0— passespnpm typecheck— passespnpm lint:fix— cleanpnpm test:run— 4469 tests passingpnpm repo:check(knip + sherif) — no issues