Skip to content

Settings panel: descriptions on SettingDef are never rendered (hint field unused) #202

Description

@JDonaghy

Problem

`SETTING_DEFS` entries carry a `description` field, but no backend ever renders it. Users only see the bare label.

Examples that would benefit immediately if this were wired up:

  • `status_line_above_terminal` — its label is now "Status Line Inside Window" but the actual semantics ('keep inside window vs separate above terminal') are buried in the description text only the source code can see (Settings: 'Status Line Above Terminal' label is inverted from its behaviour #173).
  • `scrolloff`, `textwidth`, `colorcolumn` — number-form fields where the meaning isn't obvious from the label.
  • Most boolean toggles that aren't 1:1 with their vim equivalent.

Where it stops

`render.rs::settings_to_form` (line 6334) builds `FormField { hint: StyledText::default(), .. }` — `hint` is left blank instead of being populated from `def.description`. The Form primitive (`quadraui/src/primitives/form.rs`) has the field defined and documented as "rendered below the field (or to the right, depending on backend)", but neither `src/tui_main/quadraui_tui.rs::draw_form` nor `src/gtk/quadraui_gtk.rs::draw_form` references `hint` anywhere.

Fix scope

  1. Adapter (1 line): `hint: StyledText::plain(def.description)` in `render.rs::settings_to_form` for both `CoreSetting` and `ExtSetting` arms.
  2. Layout (`quadraui::form`): `Form::layout` needs to reserve extra vertical space when a field has a non-empty hint. Probably a per-field measurement closure or a fixed extra row.
  3. TUI render (`quadraui_tui::draw_form`): emit a second row in muted colour beneath fields that have a hint.
  4. GTK render (`quadraui_gtk::draw_form`): Pango layout for the hint, dimmer colour.
  5. Win-GUI render (`quadraui_win::draw_form`): if/when this path exists.

Selection rules to consider: only render hint when (a) the field is selected (vim-style status line)? (b) always? (c) on hover (GTK) / focused row (TUI)? Worth deciding before implementing — "always" makes the panel taller; "on selection" matches Code's behaviour.

Surfaced by

#173 — relabelled `status_line_above_terminal` and added a description that explains the now-confusing field name. The label change landed but the description is invisible.

Files

  • `src/render.rs::settings_to_form` — adapter
  • `quadraui/src/primitives/form.rs` — `Form::layout` + `FormField.hint`
  • `src/tui_main/quadraui_tui.rs::draw_form` — TUI renderer
  • `src/gtk/quadraui_gtk.rs::draw_form` — GTK renderer

Priority

Low. UX nice-to-have. Mostly hits power-user-discoverability of less-common settings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginfrastructureBuild, CI, distributionuiUI/rendering

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions