Split shared UI knowledge into atomic topic directories
This commit is contained in:
1 parent
08ff987edb
commit
b0e6402d66
37 files changed
+600
-516
No files matched your search
@@ -19,7 +19,7 @@ Copy `assets/view.css` as the starting stylesheet and adapt tokens; do not rewri
|
||||
Keep shared operational components in one application stylesheet loaded after the baseline.
|
||||
Keep page-only rules local to that page. If a project promises a byte-for-byte baseline copy,
|
||||
put all overrides in the extension stylesheet; record deliberate deviations in its local bible.
|
||||
The optional `assets/operations.css` example extends `view.css`; it is not a second baseline.
|
||||
The optional `examples/operations/style.css` example extends `view.css`; it is not a second baseline.
|
||||
|
||||
## Core Direction
|
||||
|
||||
@@ -65,62 +65,6 @@ The optional `assets/operations.css` example extends `view.css`; it is not a sec
|
||||
- Clear primary buttons for the main action on a screen.
|
||||
- Simple alert/error boxes with border + tinted background.
|
||||
|
||||
## Data Formatting
|
||||
|
||||
- Money: no minor units (no cents/kopecks) — round to whole currency units for
|
||||
display. Group thousands with a non-breaking space (` `), not a comma
|
||||
or dot — e.g. `$13 320`, not `$13,320.00`. The `ru-RU` locale's own
|
||||
`toLocaleString()` grouping character is already a non-breaking space, so
|
||||
`Math.round(value).toLocaleString('ru-RU')` satisfies this directly without
|
||||
hand-rolled grouping logic.
|
||||
- Dates that only need day-level (not time-of-day) precision — a delivery
|
||||
ETA, a planning/reorder date — are shown as an ISO week number: `W32`. When
|
||||
a table row aggregates several dates that disagree (e.g. several purchase
|
||||
lots under one order with different ETAs), show the week range instead:
|
||||
`W32-34`. Audit-trail timestamps (created/updated-at) are exempt — show
|
||||
those as ordinary dates, since collapsing them to a week would hide the
|
||||
information they exist to convey.
|
||||
- Week formatting is a display convention, not a storage format: preserve the exact date in
|
||||
form values and API payloads. Date inputs may display `2026 · W40` while submitting
|
||||
`2026-10-01`. Exact-date filters may retain a normal date input.
|
||||
- Include the ISO week-year when a range crosses years or the year would be ambiguous.
|
||||
Do not compute a cross-year range from the minimum/maximum week numbers alone.
|
||||
- Compact amounts (for example `$1,2 млн`) are allowed in summary metrics. Keep full rounded
|
||||
amounts in tables so values remain comparable. Distinguish a known zero from a missing value.
|
||||
- Align numeric columns right and use tabular numerals. Keep short identifiers on one line;
|
||||
truncate long descriptions only when the complete value is available on inspection.
|
||||
|
||||
## Operational Extensions
|
||||
|
||||
- A compact header may include build version, current ISO week, sync state and a display
|
||||
privacy toggle. Keep these in normal flex flow so they cannot overlap navigation.
|
||||
- Navigation uses links with `aria-current="page"`; in-page actions use buttons.
|
||||
Quiet text-colored links are allowed in dense data cells, with visible hover and keyboard
|
||||
focus treatment. Do not apply the quiet treatment indiscriminately to every link.
|
||||
- Summary metrics may sit above tables; they supplement the records rather than replace them.
|
||||
Use the baseline's small radii, surfaces and spacing.
|
||||
- If row backgrounds communicate status, use opaque `--ok-bg`, `--warn-bg`, `--crit-bg`
|
||||
tokens and retain an explicit status indicator. Do not stack translucent status tints.
|
||||
- Optional screen-sharing privacy mode masks sensitive values in place, preserves column
|
||||
geometry and headings, and uses a labeled toggle with `aria-pressed`. Persist the preference
|
||||
locally and apply it to newly rendered values. This is display masking only: DOM values,
|
||||
API responses and exports are not redacted or access-controlled by it.
|
||||
- A discrete probability/level indicator may use filled bars plus its exact numeric value
|
||||
and accessible name. This is a defined quantitative encoding, not permission for arbitrary
|
||||
per-field colors. Risk status remains a separate concept; product-specific levels and
|
||||
thresholds stay in the project's local bible.
|
||||
|
||||
## Status Rules
|
||||
|
||||
- `OK`: green
|
||||
- `Warning`: amber
|
||||
- `Critical`: red
|
||||
- `Unknown`: gray
|
||||
- `Empty`: light gray
|
||||
|
||||
Status must not rely on color alone.
|
||||
Show text or another explicit indicator together with the color treatment.
|
||||
|
||||
## Responsive Rules
|
||||
|
||||
- Keep desktop density high.
|
||||
@@ -143,3 +87,12 @@ Show text or another explicit indicator together with the color treatment.
|
||||
- Use `controls-selection` for button hierarchy, filters, and bulk selection semantics.
|
||||
- Use `timeline-views` for optional week-based Gantt views of the same records.
|
||||
- Pattern-specific contracts may override details only when they document the reason.
|
||||
|
||||
## Topic Contracts
|
||||
|
||||
Read the relevant topic below together with this baseline; do not restate its rules locally.
|
||||
|
||||
- [Display Formatting](formatting/contract.md)
|
||||
- [Operational Visual Extensions](operations/contract.md)
|
||||
- [Status Presentation](status/contract.md)
|
||||
- [Display privacy](privacy/contract.md)
|
||||
Reference in new issue
Block a user