Document stock visual decisions and operational UI examples
This commit is contained in:
1 parent
714447aa06
commit
08ff987edb
14 files changed
+532
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Contract: Controls + Selection
|
||||
|
||||
Version: 1.4
|
||||
Version: 1.5
|
||||
|
||||
## Shared Base
|
||||
|
||||
@@ -17,7 +17,8 @@ Version: 1.4
|
||||
- Inside a data-table row action column, buttons are icon-only. Each one must have a
|
||||
deterministic `title` and `aria-label`; text labels belong in toolbars, forms and
|
||||
confirmation dialogs, not repeated in every row.
|
||||
- Buttons are text-first; icons are optional and must not replace labels on primary/danger actions.
|
||||
- Outside the documented icon-only row/toolbar controls, buttons are text-first; primary and
|
||||
destructive form/confirmation actions retain visible labels.
|
||||
- Base examples must show both `disabled` and `loading` states.
|
||||
- Any control that triggers a network or database call must show a visible busy state for the whole
|
||||
duration of that call (spinner on the control, disabled control, or an equivalent indicator), and
|
||||
@@ -41,6 +42,10 @@ selects, multiselect filters, menus, date pickers.
|
||||
- A panel must not be clipped by an ancestor's `overflow` (modal body, table wrapper). Position it
|
||||
against the viewport (`position: fixed` or a body-level layer), not inside the clipping container.
|
||||
- Implement placement once in the shared dropdown code; do not re-derive it per control.
|
||||
- A narrow table input may open a wider, content-sized suggestion panel. Clamp both horizontal
|
||||
position and width to the viewport, as well as vertical height. Keep option labels useful:
|
||||
identity, relevant status, quantity and price can share one compact line. Decorative price
|
||||
tiers must not replace the actual amount or imply a stock/risk status.
|
||||
|
||||
## Checkbox Selection
|
||||
|
||||
@@ -61,6 +66,9 @@ selects, multiselect filters, menus, date pickers.
|
||||
- straight internal separators between middle segments.
|
||||
- Active segment color may vary by context (for example blue preset selector vs dark status scope tabs), but geometry must remain consistent.
|
||||
- Segment changes should preserve other active filters where possible.
|
||||
- A view switcher uses the same joined geometry; expose the selected view with `aria-pressed`.
|
||||
A single-choice form value uses radio semantics and keyboard behavior (native radios are
|
||||
preferred), not just a colored active button. Concrete options remain product-specific.
|
||||
|
||||
## Bulk Action Safety
|
||||
|
||||
|
||||
Reference in new issue
Block a user