Server admin 8: Form widgets: colour field, tri-state permission buttons, stop slider, multi-line field #674

Closed
opened 2026-11-15 19:01:10 +00:00 by charles · 0 comments
Owner

Task 8 of the Server administration plan (docs/superpowers/plans/2026-11-15-serveradmin.md, section "### Task 8:"). The plan on the serveradmin branch is the source of truth; this copy is for reading.

Closes: —
Depends on: —

Files:

  • Create: crates/fluxer-ui/src/widgets/{color_field.rs,tri_state.rs,form.rs}, crates/fluxer-ui/tests/form_widgets.rs
  • Modify: crates/fluxer-ui/src/widgets/{mod.rs,slider.rs,text_input.rs}, crates/fluxer-ui/src/theme/icons.rs, crates/fluxer-ui/tests/screenshots.rs, README

Interfaces:

  • Produces: color_field::view(value: u32, on_change) — the swatch, the hex field (accepting #rgb, #rrggbb, rgb(), hsl() and CSS names as the original's ColorPickerField, read from the component RoleEditor.tsx imports) and its preset swatches; 0 is "no colour"; tri_state::view(TriState::{Deny, Neutral, Allow}, disabled: Option<&str>, on_change) — the three buttons of DLG/shared/PermissionComponents.tsx (PermissionStateButtons) with the disabled reason as tooltip; slider::stops(value, &[u32], format, on_change) — a slider that snaps to given stops (slowmode's 14, bitrate's range); text_input::multiline(value, max, on_change) with the n / max counter; form::{section, labelled, switch_row, radio_group, select} — thin wrappers over the rows the user settings already draw (screens/settings/mod.rs Choice and its switch rows), moved here so both settings screens share them; a searchable select (channel and role pickers, the region list).

  • Step 1: Write failing tests: hex_and_css_colour_parsing_table, invalid_colour_keeps_last_value, tri_state_click_cycles_to_the_clicked_state, disabled_tri_state_emits_nothing_and_has_tooltip, stop_slider_snaps, multiline_counter_and_max, select_filters_by_query, user_settings_rows_unchanged (the existing settings goldens still pass); goldens color_field, tri_state_buttons, stop_slider, form_rows.

  • Step 2–5: FAIL → implement → PASS → commit feat(ui): form widgets for administration.

Task 8 of the Server administration plan (`docs/superpowers/plans/2026-11-15-serveradmin.md`, section "### Task 8:"). The plan on the `serveradmin` branch is the source of truth; this copy is for reading. **Closes:** — **Depends on:** — **Files:** - Create: `crates/fluxer-ui/src/widgets/{color_field.rs,tri_state.rs,form.rs}`, `crates/fluxer-ui/tests/form_widgets.rs` - Modify: `crates/fluxer-ui/src/widgets/{mod.rs,slider.rs,text_input.rs}`, `crates/fluxer-ui/src/theme/icons.rs`, `crates/fluxer-ui/tests/screenshots.rs`, README **Interfaces:** - Produces: `color_field::view(value: u32, on_change)` — the swatch, the hex field (accepting `#rgb`, `#rrggbb`, `rgb()`, `hsl()` and CSS names as the original's `ColorPickerField`, read from the component `RoleEditor.tsx` imports) and its preset swatches; 0 is "no colour"; `tri_state::view(TriState::{Deny, Neutral, Allow}, disabled: Option<&str>, on_change)` — the three buttons of `DLG/shared/PermissionComponents.tsx` (`PermissionStateButtons`) with the disabled reason as tooltip; `slider::stops(value, &[u32], format, on_change)` — a slider that snaps to given stops (slowmode's 14, bitrate's range); `text_input::multiline(value, max, on_change)` with the `n / max` counter; `form::{section, labelled, switch_row, radio_group, select}` — thin wrappers over the rows the user settings already draw (`screens/settings/mod.rs` `Choice` and its switch rows), moved here so both settings screens share them; a searchable `select` (channel and role pickers, the region list). - [ ] **Step 1: Write failing tests**: `hex_and_css_colour_parsing_table`, `invalid_colour_keeps_last_value`, `tri_state_click_cycles_to_the_clicked_state`, `disabled_tri_state_emits_nothing_and_has_tooltip`, `stop_slider_snaps`, `multiline_counter_and_max`, `select_filters_by_query`, `user_settings_rows_unchanged` (the existing settings goldens still pass); goldens `color_field`, `tri_state_buttons`, `stop_slider`, `form_rows`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(ui): form widgets for administration`.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#674
No description provided.