Repository navigation
feat(event-display): put "Color by" first and color at random from seed - #1026
Merged
Merged
Conversation
…seed The color options menu showed the collection's color swatch and a "Random" button above the "Color by" selector, so the controls for a single color sat outside the mechanism which shows only the configs of the selected option. The selector now comes first, and the collection color is grouped under its own option, so it appears only when it is chosen - as the charge and momentum controls already did. Picking a color no longer selects the collection color option. That was safe only while the swatch sat above the selector, as a saved state applies its configs in file order and the selector, coming after, had the last word. With the selector first, restoring a state colored by charge would have applied charge and then had the stored swatch flip the option back and repaint the collection, which is the fault in #1023 the other way round. The swatch instead repaints only while its option is selected, and is hidden otherwise, so it cannot be reached out of turn. Coloring at random is now an option to color by rather than a button which painted over whatever was selected. It is seeded, with the seed kept on the selector so that it is restored before the option is applied: the same seed gives the same colors, so a saved random coloring comes back as it was, and the "Random" button re-rolls it. It previously wrote one arbitrary object's color into the swatch, which was then all that was saved, so reloading painted the whole collection that single color. Colors are picked by hue rather than in RGB, which keeps objects distinguishable from each other and from the background. Both options are offered for every collection, as neither needs anything of the event data. `group` is no longer restored from a saved state, joining `hidden` which it is derived from. A state written by an older version of Phoenix groups the collection color and "Random" differently, or not at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
🚀 Preview deployed: http://phoenix-pr-1026.surge.sh Built from 80c1781. |
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.
Before:

The color options menu showed the collection's color swatch and a "Random" button above the "Color by" selector, so the controls for a single color sat outside the mechanism which shows only the configs of the selected option. The selector now comes first, and the collection color is grouped under its own option, so it appears only when it is chosen - as the charge and momentum controls already did.
Picking a color no longer selects the collection color option. That was safe only while the swatch sat above the selector, as a saved state applies its configs in file order and the selector, coming after, had the last word. With the selector first, restoring a state colored by charge would have applied charge and then had the stored swatch flip the option back and repaint the collection, which is the fault in #1023 the other way round. The swatch instead repaints only while its option is selected, and is hidden otherwise, so it cannot be reached out of turn.
Coloring at random is now an option to color by rather than a button which painted over whatever was selected. It is seeded, with the seed kept on the selector so that it is restored before the option is applied: the same seed gives the same colors, so a saved random coloring comes back as it was, and the "Random" button re-rolls it. It previously wrote one arbitrary object's color into the swatch, which was then all that was saved, so reloading painted the whole collection that single color. Colors are picked by hue rather than in RGB, which keeps objects distinguishable from each other and from the background.
Both options are offered for every collection, as neither needs anything of the event data.
groupis no longer restored from a saved state, joininghiddenwhich it is derived from. A state written by an older version of Phoenix groups the collection color and "Random" differently, or not at all.