exlab_wizard.ui.components.filter_chips#
Filter-chip strip component (Frontend Spec §3.5.4, §11.1).
A row of toggleable chips with optional default-on / default-off state. Used in:
The main-window left tree (Active default-on, Archived default-off, Test runs default-on; Frontend §3.5.4).
The Problems tab header (Severity, Class, State, Scope; Frontend §11.1).
Functions
|
Build the chip strip. |
|
Build a |
|
Return |
|
Return the ids of currently-active chips, preserving definition order. |
|
Flip the state of |
Classes
|
One chip in a chip group. |
|
Mutable state for a chip group. |
- class exlab_wizard.ui.components.filter_chips.ChipDefinition(chip_id, label, default_on)[source]#
Bases:
objectOne chip in a chip group.
- class exlab_wizard.ui.components.filter_chips.ChipState(active)[source]#
Bases:
objectMutable state for a chip group.
- exlab_wizard.ui.components.filter_chips.filter_chips(chips, *, on_change=None, state=None)[source]#
Build the chip strip.
Returns the NiceGUI row, or the immutable props dict in test contexts.
- exlab_wizard.ui.components.filter_chips.initial_state(chips)[source]#
Build a
ChipStatefrom each chip’sdefault_on.- Parameters:
chips (
Sequence[ChipDefinition])- Return type:
- exlab_wizard.ui.components.filter_chips.is_active(state, chip_id)[source]#
Return
Truewhenchip_idis currently toggled on.
- exlab_wizard.ui.components.filter_chips.list_active(state, chips)[source]#
Return the ids of currently-active chips, preserving definition order.
- Parameters:
state (
ChipState)chips (
Iterable[ChipDefinition])
- Return type: