@filipgutica/design-system 1.0.28 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/language/decisions.md +2 -2
- package/language/reference.html +7 -2
- package/package.json +1 -1
package/language/decisions.md
CHANGED
|
@@ -13,8 +13,8 @@ Each entry records a choice this language made, the options it rejected, and why
|
|
|
13
13
|
| Quiet actions | Core | One recipe for Copy, Full size, dialog and drawer close, the project trigger, and the overflow menu trigger: transparent, `currentColor` at 6% on hover and 12% pressed (see Quiet action fill), no sink, and the control ring. The project trigger keeps the tint but takes the field corner (see One-line non-action controls). | Each had its own hover (`--color-row-hover`, a colour change only, or a 12% tint), so the same kind of action behaved differently. | rule present: `tests/design-foundations.test.mjs` "every state rule the guard requires exists in the catalogue"; tint recipe: `tests/catalogue/catalogue.spec.ts` "a hovering pointer adds a 6% fill, and a press 12%" |
|
|
14
14
|
| Quiet action fill | Core | `currentColor` at 6% under a hovering pointer and 12% pressed, a faint overlay after Astryx's ghost button overlay (the idea only; no code copied). The user approved it from rendered demos. | 12% hover and 18% pressed, the previous values, replaced by the fainter overlay the user chose. No fill on hover, with only the icon brightening: it hides the hit target, so the reader cannot see what a click will reach. | hover and press alpha: `tests/catalogue/catalogue.spec.ts` "a hovering pointer adds a 6% fill, and a press 12%"; no fill after a tap: "a tap leaves no fill behind" |
|
|
15
15
|
| One source per control | Core | Each control comes from the owning library's component or class, including a link styled as a button. | Local copies built from the same tokens drifted: a docs button had no raise and only faded when pressed. | copied rules unchanged: `tests/design-foundations.test.mjs` "example pages copy the catalogue rules for the shared controls and components they use unchanged" |
|
|
16
|
-
| Minimal by default | Core | Every interface starts minimal: the subtraction rules in [Minimal by default](DESIGN.md#minimal-by-default) for status, meta lines, rows, marks, actions, forms, boxes, and explanations, with a never-cut list, and words, boxes, and controls counted before and after each change. Prose keeps the copy rules. Taken from the PluginBench redesign, where cutting to these rules took Results from 412 to 306 words and 12 to 7 boxes, Queue from 34 to 28 controls, and New eval from 221 to 148 words (whole-page counts at 1280px). | A minimal pass per project: PluginBench needed two rounds of "less" before it got there. A fixed word or box budget: the right count depends on the task, and a budget would punish real data. Counting screen-reader-only text: it would reward cutting accessible names. The same rules for lessons and product prose: they need their explanation. |
|
|
17
|
-
| Status in one sentence | Core | A view's summary sentence carries the status, its numbers, and a status icon. An alert holds only a caveat or action the summary cannot carry, one per view at most. | A banner above the summary that repeats it: PluginBench's Results had both, and the banner added a box and a second reading of the same fact. | No
|
|
16
|
+
| Minimal by default | Core | Every interface starts minimal: the subtraction rules in [Minimal by default](DESIGN.md#minimal-by-default) for status, meta lines, rows, marks, actions, forms, boxes, and explanations, with a never-cut list, and words, boxes, and controls counted before and after each change. Prose keeps the copy rules. Taken from the PluginBench redesign, where cutting to these rules took Results from 412 to 306 words and 12 to 7 boxes, Queue from 34 to 28 controls, and New eval from 221 to 148 words (whole-page counts at 1280px). | A minimal pass per project: PluginBench needed two rounds of "less" before it got there. A fixed word or box budget: the right count depends on the task, and a budget would punish real data. Counting screen-reader-only text: it would reward cutting accessible names. The same rules for lessons and product prose: they need their explanation. | `tests/catalogue/minimal.spec.ts` "the console keeps the minimal rules with the … filter": one alert per view and none that repeats a badge, one-line rows, two visible actions per row at most, no shadow on a sticky bar, and no box in a box, on the application example |
|
|
17
|
+
| Status in one sentence | Core | A view's summary sentence carries the status, its numbers, and a status icon. An alert holds only a caveat or action the summary cannot carry, one per view at most. | A banner above the summary that repeats it: PluginBench's Results had both, and the banner added a box and a second reading of the same fact. | `tests/catalogue/minimal.spec.ts` "the No data monitor states its status in one sentence, with no badge or alert"; "the console keeps the minimal rules with the … filter" |
|
|
18
18
|
| Overflow menu | Core | Two or more secondary actions sit behind an icon-only quiet action with an SVG "more" icon, in a floating menu with concentric rows: the WAI-ARIA menu button pattern, which reka-ui's DropdownMenu and ui-sdk's Menu both follow. A destructive item comes last, after a separator, and confirms in a dialog. The primary action and a recovery action stay visible. | A `<details>` disclosure, as the project menu uses for links: an action menu built that way would behave differently from both headless libraries an implementation builds on. A `⋯` text glyph, as the PluginBench mockup used: a font draws its ink off the centre of its box (see Quiet actions). A menu for a single secondary action: it hides one action behind two presses. | keyboard path: `tests/catalogue/catalogue.spec.ts` "the overflow menu follows the menu button pattern"; corners: "each component renders the corner radius of its role, and no other part has one"; danger item contrast: "contrast: every danger menu item reaches 4.5:1" |
|
|
19
19
|
| Faint uncertainty | Core | In a chart, every point, line, and label stays at full strength; the intervals of the points that are not selected fade to about 20% opacity, and the selected point keeps strong intervals and an accent ring. Matrix cells show a value and an icon, with the verdict word only on cells with a clear result and the full words in every accessible name, and one key line under the chart. Taken from the PluginBench Results scatter and overview grid. | Strong intervals on every point: with three efforts and two packages, six pairs of intervals crossed and hid the selected one. Fading whole points: the data the reader compares would drop below non-text contrast. Hiding unselected intervals: it removes the uncertainty a reader needs to judge any point. A verdict word and a border on every cell: six boxes and six repeated words where only the clear results needed a word. | No test yet |
|
|
20
20
|
| Section mark | Identity | The `##` mark goes only on the page-level section headings (h2) of documentation, CLI tool, article, and product pages, which are mono with a `--color-border-subtle` rule above. Application and inline-visualization section headings are plain `--font-ui` semibold at `--text-xl` or smaller, with no mark and no rule. h3 and lower never take it. | The mark on every section heading: on a dense screen, such as a metrics dashboard with six sections, it repeated down the page and competed with the data. The mark on h2 and h3: deeper levels repeat more often. A per-page opt-out class: every application page would need to remember it. Dropping the mark: reading pages lose the folio identity that ties them to the `~/name` header. Mono application section headings without the mark: the mono face alone still reads as a document heading among compact sans rows. | No test yet |
|
package/language/reference.html
CHANGED
|
@@ -243,6 +243,10 @@
|
|
|
243
243
|
.detail > * { padding: var(--space-4); }
|
|
244
244
|
.detail > * + * { border-top: 1px solid var(--color-border-subtle); }
|
|
245
245
|
.detail h2 { font-size: var(--text-md); }
|
|
246
|
+
/* A status the badge cannot carry is one sentence under the title, with the status's own icon and colour from
|
|
247
|
+
the list, instead of a badge and an alert. */
|
|
248
|
+
.status-line { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; font-size: var(--text-sm); }
|
|
249
|
+
.status-line .icon { margin-top: 0.125rem; }
|
|
246
250
|
/* A code block inside a panel becomes a flush section, not a nested box. */
|
|
247
251
|
.detail > .code { padding: 0; border: 0; border-radius: 0; border-top: 1px solid var(--color-border-subtle); box-shadow: none; }
|
|
248
252
|
/* Its source spans the section, under one hairline, as a live example's does. */
|
|
@@ -904,12 +908,13 @@
|
|
|
904
908
|
<div style="display:grid;gap:var(--space-2)">
|
|
905
909
|
<span class="caption mono">${m.id}</span>
|
|
906
910
|
<h2>${esc(m.name)}</h2>
|
|
907
|
-
|
|
911
|
+
${m.status === 'nodata'
|
|
912
|
+
? `<p class="status-line"><span class="st-${m.status}" aria-hidden="true">${icon(st.icon)}</span><span>No data for 42 minutes. Check ingestion before you trust this monitor.</span></p>`
|
|
913
|
+
: `<div><span class="badge ${st.badge}">${st.label}</span></div>`}
|
|
908
914
|
</div>
|
|
909
915
|
<figure class="chart-wrap">${chart(m)}
|
|
910
916
|
<figcaption class="caption">Last 24 hours. The dashed line is the threshold.</figcaption>
|
|
911
917
|
</figure>
|
|
912
|
-
${m.status === 'nodata' ? `<div class="alert warning">${icon('i-alert')}<p>No data for 42 minutes. Check ingestion before you trust this monitor.</p></div>` : ''}
|
|
913
918
|
<dl class="props">
|
|
914
919
|
<dt>Current</dt><dd class="mono num">${m.value}</dd>
|
|
915
920
|
<dt>Condition</dt><dd class="mono">${m.op} ${m.threshold} ${m.unit} for 10m</dd>
|