Skip to content

fix(ui): give every select and slider its own element id - #1234

Merged
guyverino merged 1 commit into
mainfrom
feat/atlas-control-ids
Nov 4, 2026
Merged

guyverino merged 1 commit into
mainfrom
feat/atlas-control-ids

Conversation

@guyverino

@guyverino guyverino commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

Left to the component defaults, every MoonSelect of a view had the element path moon-select and every slider slider-bar-container. The empty screen's five block dropdowns, the General page's selects, and the Appearance, Lines, detects-frame and trade-sound sliders could not be told apart by path, so anything that addresses controls by it (the GPUI inspector, a scripted test, the UI-atlas capture) saw one control where there were five. On the atlas the five empty-screen dropdowns lit up together as one control with one description.

Changes

  • Every MoonSelect and MoonSlider now gets an id at its call site. The helpers that build them take one: slider_ctl, slider_ctl_w, slider_field, the detects popup's slider_row, General's select_control.
  • A control that fills a labelled row is named <row id>:field (general-language:field, lines-card-width:field). The empty screen's selects are named after their block's switch (main-empty-place-logo, …), and the colour-group sliders after their row's key (iface-slider-{key}, iface-alpha-{key}).

Notable decisions

  • select_control takes the id after the state, so the static contract theme_contract/analytics.rs, which looks for select_control(&self.valuation,, keeps holding unedited.
  • No behaviour or layout change. A full UI-scene capture of 152 screens differs from the previous one by at most 0.12 % of pixels per screen.

Known limitations

Issues

None of the 74 open issues is touched by this change.

How to verify

cargo build -p moon-ui-gpui --bin moonterminal --target x86_64-pc-windows-msvc --all-targets
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings
cargo test --workspace --target x86_64-pc-windows-msvc

All four green after the rebase onto main: fmt clean, zero warnings, 9039 tests passed, 0 failed (211 ignored). FireTest was not run (the developer's standing instruction).

@guyverino
guyverino force-pushed the feat/atlas-control-ids branch from 111d2e8 to 1a3f008 Compare November 4, 2026 21:36
Left to the component defaults, every MoonSelect of a view was the
element path `moon-select` and every slider `slider-bar-container`: the
empty screen's five block dropdowns, the General page's selects, the
Appearance and Lines sliders could not be told apart by their path, so
anything addressing controls by it (the UI atlas, an inspector) saw one
control where there were five.

- Each MoonSelect and MoonSlider now gets an id at its call site; the
  slider and select helpers take one (`slider_ctl`, `slider_ctl_w`,
  `slider_field`, the detects `slider_row`, General's `select_control`).
- A control that fills a labelled row is named `<row id>:field`; the
  empty screen's selects are named after their block's switch.
@guyverino
guyverino force-pushed the feat/atlas-control-ids branch from 1a3f008 to 3158158 Compare November 4, 2026 22:28
@guyverino
guyverino merged commit dbea5ce into main Nov 4, 2026
10 checks passed
@guyverino
guyverino deleted the feat/atlas-control-ids branch November 4, 2026 22:29
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