Spring time mode, save/load state, batch set, folder polish#43
Merged
Conversation
- Spring: new Time mode (duration + bounce) alongside Physics; either
mode emits { stiffness, damping, mass }.
- panel.toJSON() / fromJSON(): save and restore the whole panel — values
plus open folders and active tab — separate from the presets system.
- panel.setMany(): set several values at once with a single update.
- Folders show a hairline above each group; docs samples use folders more.
- Fix: a segmented pill inside a non-default tab now measures on reveal.
The collapsed body kept a 6px residual (the inner padding-top survived the collapse), so the title sat off-centre under its rule. Collapse that padding to zero and retune the folder's top padding so the title now has equal room above and below — 9.5px — in both the open and collapsed states.
Put the folder title in a full row-height header (centred like every other row) framed top and bottom by a hairline, with consecutive folders sharing one rule. The title now sits evenly in its section — ~9px above and below — in both the open and collapsed states, a cleaner section rhythm than the cramped label.
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.
A few additions and some polish — all dependency-free, types included, tests green.
New
{ stiffness, damping, mass }, so consumers don't change.panel.toJSON()/panel.fromJSON()— save and restore the whole panel: every value plus which folders are open and which tab is active. Separate from the built-in presets, so you can keep it in a file, a URL, or your own store.JSON.stringify(panel)works too.panel.setMany({ ... })— set several values at once with a single update (one listener fire instead of one per key).Polish
Fix