Skip to content

feat(event-display): put "Color by" first and color at random from seed - #1026

Merged
EdwardMoyse merged 1 commit into
mainfrom
feat/color-by-random-mode
Sep 12, 2026
Merged

EdwardMoyse merged 1 commit into
mainfrom
feat/color-by-random-mode

Conversation

@EdwardMoyse

Copy link
Copy Markdown
Member

Before:
image

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.

…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>
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed: http://phoenix-pr-1026.surge.sh

Built from 80c1781.

@EdwardMoyse
EdwardMoyse merged commit a9c339e into main Sep 12, 2026
14 checks passed
@EdwardMoyse
EdwardMoyse deleted the feat/color-by-random-mode branch September 12, 2026 10:28

This branch was successfully deployed

2 active deployments
pull-request — 80c17815 Deployed Sep 12, 2026 by github-actions[bot]
github-pages — 80c17815 Deployed Sep 12, 2026 by EdwardMoyse via deploy #529
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.

1 participant