Skip to content

feat(#192): theme factor fields state their own range - #193

Merged
octalide merged 3 commits into
devfrom
feat/192
Oct 1, 2026
Merged

octalide merged 3 commits into
devfrom
feat/192

Conversation

@octalide

@octalide octalide commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #192

Plan

  • theme.Field gains lo and hi: the range a UNIT_FACTOR value takes, 0 and 0 for the other units. Every row of FIELDS states them. plot.area and <kind>.overflow are 0 to 1, the six motion fields 0 to 2.
  • The editor's slider takes a factor's range from its row, replacing the 0 to 1 factor cap and the hand-coded 0 to 2 for GROUP_MOTION. Colors stay 0 to 1 and lengths 0 to LENGTH_MAX.
  • Tests: table__factors_state_a_range_and_others_none holds the table to the contract, and editor__factor_slider_spans_its_fields_range drags motion.hover_ease to the end of its slider and expects 2.

Decided here: the range is lo and hi rather than a max alone, so a factor that goes below 0 needs no layout change. The README field table is unchanged (the range isn't shown in it), so document__is_the_readme_field_table still passes as is.

Ran: release build, mach test . --filter editor|table__|document__, demo/gallery and demo/panel tests (goldens unchanged), mach fmt --check ..

each field table row carries lo and hi, the range a UNIT_FACTOR value
takes, and 0 for the other units. a test holds the table to it.
the hand-coded 0 to 1 cap on factors and 0 to 2 on the motion fields
give way to each field's own lo and hi.
@octalide
octalide marked this pull request as ready for review October 1, 2026 16:45
@octalide
octalide merged commit 9aee065 into dev Oct 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: theme factor fields state their own range for the editor

1 participant