pi-utils-settings: v0.20.0
Minor Changes
- 05bdf78:
SectionedSettings’contentHeightis now a true flex layout instead of pad-only: the item list window shrinks to make room for the selected item’s description, which is wrapped in full (never truncated, no ellipsis) and bottom-anchored just above the hint line, while blank padding between the list and the description keeps the content at exactly the configured number of lines. This replaces the rejectedfixedDescriptionLinestruncation approach, which has been removed.SettingsDetailEditorgains a matchingcontentHeightoption: in list mode the field window shrinks for the bottom-anchored, fully wrapped description, and its other modes (text editing, choice selector, empty state) pad to the fixed height so the panel never changes size.registerSettingsCommandaccepts a newcontentHeightoption (default 20) wired to the settings body, replacing its previously hardcoded layout values. WhencontentHeightis unset, both components render exactly as before. - 7e0ec5f: Add a
contentHeightoption toSectionedSettings: the rendered body is held at exactly the given number of lines, so the panel height stays stable across tabs and cursor moves (same goal as the Wizard’sminContentHeightoption).registerSettingsCommandpasses acontentHeightof 20 by default, so the settings panel no longer jumps in height when switching tabs. See the flex-content-height-layout changeset for the layout details. - 7e60ea4: Unframed submenu components:
FuzzySelector,FuzzyMultiSelector,ArrayEditor, andPathArrayEditorno longer wrap their output in a borderedPanel— they render a plain styled title line followed by the body at full width, so they sit cleanly inside theregisterSettingsCommandpanel’s own border instead of drawing a nested box. The internalrenderSettingsPanelhelper was removed (no replacement API; the old bordered layout has no supported opt-in). Each component now implementsgetShortcuts(): string | undefined(theSettingsSubmenuComponentcontract), returning the shortcuts for its current internal mode (list vs add/edit input for the array editors, search vs no-matches forFuzzySelector), and accepts ahideHintoption (defaultfalse) that suppresses its own shortcut footer when a host panel renders the single controls line — passhideHint: ctx.hideHintfrom the submenu factory. ForFuzzyMultiSelector, which already had a publicshowHintsoption (defaulttrue),hideHinttakes precedence and wins overshowHintswhen both are set. - 5d259ea: Unified shortcut line: the settings panel from
registerSettingsCommandnow renders exactly one controls line at any time, always below the separator. Submenu components can implementgetShortcuts(): string | undefined(newSettingsSubmenuComponentcontract) to expose the shortcuts they currently respond to; while a submenu is open, the panel’s controls line shows those instead of the defaultEnter/Space change · Ctrl+S save · Esc close(falling back to the default when the submenu exposes none).SectionedSettingsgainsgetActiveSubmenuShortcuts()and forwards itshideHintoption through the submenu factory context (SettingsSubmenuContext.hideHint).SettingsDetailEditorimplementsgetShortcuts()per mode (list / text editing / enum choice / confirm / empty state, delegating to nested submenus) and accepts a newhideHintoption that suppresses its own hint footer lines while keeping the fixedcontentHeightlayout — passhideHint: ctx.hideHintwhen hosting it fromregisterSettingsCommand. Esc semantics stay accurate (with a submenu open, Esc backs out of the submenu), and Ctrl+S still saves from any depth.