Repository navigation
Fill levels for numeric attributes - #17
Merged
Merged
Conversation
Generates a level set from a range and step, a range and count, steps around a reference, or a geometric series, rounded to units that suit the attribute (minutes, hours, money in 0.01/0.10/0.50/1, pivot multipliers). It can replace or add to the shared levels or one alternative's own levels, keeps existing levels whose value stays, and explains merged, negative or too many levels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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
Numeric attributes get a Fill levels… button next to "Add level". It opens a panel that generates the level set:
Methods:
Rounding by unit (
lib/levelFill.ts):Apply to: the shared levels, or one alternative's own levels. The latter creates or replaces its per-alternative set.
Replace or add: "Replace" swaps in the new set. "Add to existing" merges the values into the current set. Levels whose value stays keep their id, display label and image.
Preview: the same number line as the levels editor, plus the values in mono.
Explanations, without blocking:
Invalid inputs show a reason instead of a preview (zero step, more than 12 levels, ratio of 1).
The panel starts from the attribute's current levels. Escape or Cancel closes it and returns focus to the button.
Test plan
npm test(1034 passed, 13 new inlevelFill.test.ts),tsc --noEmit🤖 Generated with Claude Code