Conversation
Objectstore rewrote Counter from scratch as SizeCounter because the control had no `step` (500 GB increments), no `unit` suffix, no `error` / `helperText` line, no right-hand `labelAction` for the live price and no `disabled`; volumes overrides `max-w-none w-full` to stretch it in a drawer, now `fullWidth`. `decrementLabel` / `incrementLabel` localise the button names. The label is now associated with the input through `id` (it referenced an id the input never had), and the field describes itself with `aria-invalid` / `aria-describedby` like Input does.
This branch has not been deployed
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
Objectstore rewrote
Counterfrom scratch asSizeCounterbecause the control lacked everything a sized field needs. This adds:step: amount added/subtracted by the buttons (clamped tomin/max), e.g. 500 GB increments.unit: suffix rendered inside the field after the value.error/helperText(+ class name props): message line below the control, wired witharia-invalid/aria-describedbylikeInput; error also colours the field border.labelAction: right end of the label row (live price in objectstore).disabled: disables buttons and input.fullWidth: stretches the field to its container (volumesResizeDraweroverridesmax-w-none w-fullfor this).decrementLabel/incrementLabel: localisable button names.Also fixes the label association: the
<label>pointed at an id the input never had, so it now setsidon the input.Defaults are unchanged (step 1, no unit, no messages).
Test plan
aria-describedby, disabled, custom button labels, axenpx vitest run lib/components/Counter(24), lint, types, prettierCounter/LightandDark→WithUnitAndMessages