@imfusion/web-ui 0.10.1-dev.45.ga6a3c86a → 0.10.1-dev.46.g5fe8962a
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/CHANGELOG.md +1 -0
- package/package.json +1 -1
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +25 -27
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +6 -6
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +3 -3
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -153,6 +153,7 @@ never changes the character width, so columns stay aligned. CoFo Sans Mono still
|
|
|
153
153
|
- `Skeleton.Root` fades only its own content in when loading ends; the rest of the page stays still, and no `AbortError` reaches the console — Nikolaus Brunner <brunner@imfusion.com>
|
|
154
154
|
- `AppShell`'s docked aside no longer leaves `AppShell.Main` up to 13px under it at 1024px: Main ends where the aside begins at every docked width — Nikolaus Brunner <brunner@imfusion.com>
|
|
155
155
|
- The Stop hook's verify gate blocks only a turn that edited files. An edit from an earlier turn no longer blocks later turns that only answer questions while the tree stays dirty — Nikolaus Brunner <brunner@imfusion.com>
|
|
156
|
+
- `imf-web-ui-ux` describes patterns and points to `imf-web-ui-components` for which components exist, instead of claiming which ones do not — Nikolaus Brunner <brunner@imfusion.com>
|
|
156
157
|
|
|
157
158
|
---
|
|
158
159
|
|
package/package.json
CHANGED
|
@@ -7,8 +7,8 @@ description:
|
|
|
7
7
|
|
|
8
8
|
# Shape the screen
|
|
9
9
|
|
|
10
|
-
Use this skill for screen-level decisions.
|
|
11
|
-
`imf-web-ui-conventions`.
|
|
10
|
+
Use this skill for screen-level decisions. The patterns below name no components: check which component fits a pattern, and
|
|
11
|
+
its API, in `imf-web-ui-components`. Put code and styling rules in `imf-web-ui-conventions`.
|
|
12
12
|
|
|
13
13
|
Invoke `imf-web-ui-user-profile` first and explain at its levels throughout.
|
|
14
14
|
|
|
@@ -34,33 +34,31 @@ unanswered, make the conservative choice and state the assumption.
|
|
|
34
34
|
## Choose a surface
|
|
35
35
|
|
|
36
36
|
- Use a full page by default.
|
|
37
|
-
- Use
|
|
38
|
-
- Use
|
|
39
|
-
- Use
|
|
40
|
-
- Use
|
|
41
|
-
- Use
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
reason.
|
|
37
|
+
- Use a side panel for a focused task that keeps the current page in context.
|
|
38
|
+
- Use a floating panel anchored to its trigger for small contextual content or a light form.
|
|
39
|
+
- Use a hover or focus hint for a short label only. It must not contain required or interactive information.
|
|
40
|
+
- Use a collapsible region for secondary content inside the page.
|
|
41
|
+
- Use tabs for parallel views of one subject. If users must complete every section, use a flow instead.
|
|
42
|
+
- Use a modal dialog for a decision that must be settled before the page continues, such as a destructive action. If no
|
|
43
|
+
component fits a pattern, raise the gap rather than hand-rolling a replacement without a product reason.
|
|
45
44
|
|
|
46
45
|
## Choose between similar controls
|
|
47
46
|
|
|
48
|
-
-
|
|
49
|
-
- Use
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- Use
|
|
54
|
-
- Use
|
|
55
|
-
- Use
|
|
56
|
-
- Use `Slider` when relative position matters more than typing an exact value.
|
|
47
|
+
- An action is a button, navigation is a link, and a label is a chip.
|
|
48
|
+
- Use an inline link inside text or in a row of chips, and a full-row link for a list of resources.
|
|
49
|
+
- Use a plain table for static small data. Pair it with a headless table library for sorting, pagination, or column logic.
|
|
50
|
+
TanStack Table is the recommended choice.
|
|
51
|
+
- Use an in-place status message for persistent status. Keep transient confirmation near the action it confirms.
|
|
52
|
+
- Use a switch for an immediate setting and a checkbox for a submitted choice.
|
|
53
|
+
- Use a select for a known list, and consider a different control when the list is very short or very large.
|
|
54
|
+
- Use a slider when relative position matters more than typing an exact value.
|
|
57
55
|
|
|
58
56
|
## Build the hierarchy
|
|
59
57
|
|
|
60
|
-
- Frame an application with
|
|
61
|
-
-
|
|
58
|
+
- Frame an application with the library's app shell.
|
|
59
|
+
- Arrange content with stack and row layouts, wrap long-form text in a prose container, and use a separator for a real
|
|
62
60
|
division.
|
|
63
|
-
- Use
|
|
61
|
+
- Use the library's typography components for text hierarchy instead of styling raw headings beside them.
|
|
64
62
|
- Give a view one primary action. Make other actions quieter.
|
|
65
63
|
- Choose density from the user's frequency and data volume: frequent work and large data need compact layouts; occasional
|
|
66
64
|
work benefits from more explanation and space.
|
|
@@ -70,15 +68,15 @@ reason.
|
|
|
70
68
|
Plan these states with the loaded view:
|
|
71
69
|
|
|
72
70
|
- **Empty**: say what belongs here and what the user can do next.
|
|
73
|
-
- **Loading**: use
|
|
74
|
-
which
|
|
75
|
-
- **Error**: explain what failed and the next action in
|
|
71
|
+
- **Loading**: use a spinner or a stable skeleton; keep the frame from jumping. The `imf-web-ui-conventions` data topic says
|
|
72
|
+
which skeleton part fits each way the data loads.
|
|
73
|
+
- **Error**: explain what failed and the next action in an in-place status message near the problem.
|
|
76
74
|
- **Loaded**: the normal view.
|
|
77
75
|
|
|
78
76
|
## Keep custom UI native
|
|
79
77
|
|
|
80
|
-
When
|
|
81
|
-
|
|
78
|
+
When no component covers a piece, compose its primitives and use `--imf-ui-*` tokens. The implementation details are in
|
|
79
|
+
`imf-web-ui-conventions`.
|
|
82
80
|
|
|
83
81
|
For a screen review, read the relevant reference under `references/`: `usability-heuristics.md`, `visual-design.md`, or
|
|
84
82
|
`forms.md`.
|
|
@@ -6,9 +6,9 @@ validation. These rules cover structure and feedback.
|
|
|
6
6
|
## Structure
|
|
7
7
|
|
|
8
8
|
- Remove fields that can be derived or asked later.
|
|
9
|
-
- Use one column by default. Put short, inseparable values such as city and postal code
|
|
10
|
-
- Group related fields
|
|
11
|
-
- Use a labeled
|
|
9
|
+
- Use one column by default. Put short, inseparable values such as city and postal code on one row.
|
|
10
|
+
- Group related fields with tight spacing and separate groups with more space.
|
|
11
|
+
- Use a labeled fieldset or heading for each group.
|
|
12
12
|
- Match a field's size to the value it expects.
|
|
13
13
|
|
|
14
14
|
## Labels
|
|
@@ -21,10 +21,10 @@ hints near the field before the user starts typing.
|
|
|
21
21
|
Validate when the user finishes a field, except where live feedback genuinely helps, such as password requirements. Keep the
|
|
22
22
|
error next to the field and use more than color to show it.
|
|
23
23
|
|
|
24
|
-
An error says what is wrong and how to fix it. Keep the user's input. A server or form-level failure belongs in
|
|
25
|
-
near the actions; field-level failures stay with their fields.
|
|
24
|
+
An error says what is wrong and how to fix it. Keep the user's input. A server or form-level failure belongs in an in-place
|
|
25
|
+
status message near the actions; field-level failures stay with their fields.
|
|
26
26
|
|
|
27
27
|
## Submission
|
|
28
28
|
|
|
29
|
-
Use one primary
|
|
29
|
+
Use one primary button whose label names the result, such as `Create project`. While submitting, keep the form visible and
|
|
30
30
|
show progress. A failed submission must leave the user's input on screen.
|
|
@@ -5,12 +5,12 @@ user research.
|
|
|
5
5
|
|
|
6
6
|
1. **Show system status.** Give async actions visible progress and confirmation.
|
|
7
7
|
2. **Use the user's language.** Labels and ordering should match the domain, not an API's private names.
|
|
8
|
-
3. **Provide an exit.**
|
|
8
|
+
3. **Provide an exit.** Side panels and floating panels need clear dismissal; destructive actions need confirmation or undo.
|
|
9
9
|
4. **Be consistent.** Reuse the library's established components and semantics.
|
|
10
10
|
5. **Prevent errors.** Constrain known choices and disable actions that cannot work.
|
|
11
11
|
6. **Support recognition.** Keep relevant options and context visible instead of making users remember them.
|
|
12
12
|
7. **Support frequent users.** Add keyboard shortcuts or dense layouts when the task is frequent and data-heavy.
|
|
13
13
|
8. **Remove decoration without a job.** Every element should support the action or the data.
|
|
14
14
|
9. **Make errors recoverable.** Say what failed and what to do next, near the problem.
|
|
15
|
-
10. **Keep help contextual.** Prefer a short hint beside a control to essential information hidden in a
|
|
16
|
-
page.
|
|
15
|
+
10. **Keep help contextual.** Prefer a short hint beside a control to essential information hidden in a hover hint or
|
|
16
|
+
separate page.
|
|
@@ -7,12 +7,12 @@ Use this when a screen works but still looks wrong. Decide the hierarchy before
|
|
|
7
7
|
Write the intended order of attention: title, primary action, content, and supporting details. Use contrast and scale to make
|
|
8
8
|
that order visible. Keep variation limited; if everything is loud, nothing leads.
|
|
9
9
|
|
|
10
|
-
Reserve saturated status colors for meaning. The primary
|
|
10
|
+
Reserve saturated status colors for meaning. The primary button should be the strongest action treatment on the screen.
|
|
11
11
|
|
|
12
12
|
## Grouping
|
|
13
13
|
|
|
14
|
-
Use proximity first: tight gaps inside a group, larger gaps between groups.
|
|
15
|
-
|
|
14
|
+
Use proximity first: tight gaps inside a group, larger gaps between groups. Spacing values encode this relationship. Use a
|
|
15
|
+
shared card or bordered region only when spacing alone does not make the relationship clear.
|
|
16
16
|
|
|
17
17
|
Similarity helps related elements stay recognisable across a layout. It supports proximity; it does not replace it.
|
|
18
18
|
|