@cloudfrogger/goodui 0.0.73 → 0.0.75
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/ai/README.md +6 -0
- package/ai/catalog/components/good-form-row.json +16 -1
- package/ai/catalog/components/good-group.json +1 -2
- package/ai/catalog/components/good-heading-2.json +3 -1
- package/ai/catalog/components/good-heading-group.json +3 -1
- package/ai/catalog/components/good-section.json +49 -1
- package/ai/catalog/components/good-table.json +55 -0
- package/ai/catalog/index.json +4 -4
- package/ai/examples/settings.html +3 -2
- package/ai/examples/settings.ts +2 -2
- package/ai/guides/common-mistakes.md +6 -0
- package/ai/guides/layout.md +4 -2
- package/ai/guides/page-patterns.md +7 -1
- package/ai/manifest.json +2 -2
- package/ai/skill/goodui/SKILL.md +12 -2
- package/angular/projects/goodui/package.json +1 -1
- package/angular/projects/goodui/src/lib/group.ts +1 -1
- package/angular/projects/goodui/src/lib/table.ts +6 -1
- package/angular/projects/goodui/src/lib/typography.ts +4 -1
- package/angular/projects/goodui/src/styles.css +30 -2
- package/design/app-shell-contract.json +2 -0
- package/design/component-map.json +44 -1
- package/design/header-search-variants.json +2 -0
- package/design/settings-layout-contract.json +166 -0
- package/design/typography-components.json +2 -1
- package/design.md +4 -3
- package/fesm2022/cloudfrogger-goodui.mjs +21 -13
- package/fesm2022/cloudfrogger-goodui.mjs.map +1 -1
- package/guides/components/group.md +18 -0
- package/guides/components/header-actions.md +2 -0
- package/guides/components/header-avatar.md +2 -0
- package/guides/components/header-menu.md +2 -0
- package/guides/components/main-view.md +4 -0
- package/guides/components/settings.md +4 -0
- package/guides/components/sidebar.md +2 -0
- package/guides/components/subnav.md +2 -0
- package/guides/components/table.md +8 -0
- package/guides/components/typography.md +23 -0
- package/guides/contributing/design-to-code.md +17 -0
- package/guides/layout/screen-design.md +63 -0
- package/homepage/src/app/examples/settings/settings-page.html +112 -0
- package/homepage/src/app/examples/settings/settings-page.ts +133 -0
- package/homepage/src/app/examples/settings/source-code.generated.ts +3 -0
- package/package.json +2 -2
- package/styles.css +1 -1
- package/types/cloudfrogger-goodui.d.ts +9 -3
package/ai/README.md
CHANGED
|
@@ -41,6 +41,12 @@ Codex supports explicit `$goodui` invocation. Claude Code supports `/goodui`. Ke
|
|
|
41
41
|
|
|
42
42
|
After updating GoodUI, its bundled references update automatically. Re-run the installer to refresh the skill; use `--force` after reviewing any edits to the existing copy. Keep the lockfile and skill changes together.
|
|
43
43
|
|
|
44
|
+
## Design guidance included with the skill
|
|
45
|
+
|
|
46
|
+
For new screens and substantial layout changes, the skill directs the agent to `guides/layout/screen-design.md`. It covers task and visual hierarchy, choosing complete examples, surfaces and actions, responsive behavior, and a rendered review with concrete failure criteria. The catalog remains the API reference. The design guide helps agents make and verify composition decisions; a successful build alone does not prove a good interface.
|
|
47
|
+
|
|
48
|
+
These instructions reach another project when it installs the updated package and refreshes its GoodUI skill. Existing installed skills do not update just because this repository changes. Review local edits before using the installer's `--force` option, then start a new agent session.
|
|
49
|
+
|
|
44
50
|
## Find the right references
|
|
45
51
|
|
|
46
52
|
Start with `ai/catalog/index.json` and `ai/guides/component-discovery.md`. Read component details and guides for the requested task. The catalog covers the public Angular selectors, their imports, inputs, outputs, variants, projection slots, and forms integration. Source files and `angular/projects/goodui/src/public-api.ts` cover services and exported types. `ai/examples/` supplies small page patterns; the referenced homepage examples show larger compositions.
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"composition": {
|
|
33
33
|
"projectedContent": [
|
|
34
|
-
"*"
|
|
34
|
+
"*",
|
|
35
|
+
"[good-form-row-actions]"
|
|
35
36
|
],
|
|
36
37
|
"relatedSelectors": [],
|
|
37
38
|
"notes": "See source template and component guide for projection slots."
|
|
@@ -61,6 +62,20 @@
|
|
|
61
62
|
"kind": "component",
|
|
62
63
|
"state": "3",
|
|
63
64
|
"owner": null
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"penpotName": "goodui.form-row.3-actions",
|
|
68
|
+
"penpotId": "489901a3-7f15-8049-8008-fc8a65b2f013",
|
|
69
|
+
"kind": "component",
|
|
70
|
+
"state": "3-actions",
|
|
71
|
+
"owner": null
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"penpotName": "goodui.form-row.3-actions-mobile",
|
|
75
|
+
"penpotId": "489901a3-7f15-8049-8008-fc8a672942eb",
|
|
76
|
+
"kind": "component",
|
|
77
|
+
"state": "3-actions-mobile",
|
|
78
|
+
"owner": null
|
|
64
79
|
}
|
|
65
80
|
],
|
|
66
81
|
"missing": {
|
|
@@ -109,8 +109,7 @@
|
|
|
109
109
|
"usage": {
|
|
110
110
|
"summary": "`good-group` collects related content without the visual weight of a Card. It owns padding and a 16 px gap between projected children. Paragraphs and controls contribute no outer spacing, so a paragraph, Checkbox, RadioGroup, Select, or FormRow can be substituted without doubling that gap. Checkbox and radio choices retain 44 px touch targets inside their own bounds. `appearance=\"outline\"` (default) draws a quiet border and places an optional title in that border; `contrast` uses a soft theme-aware background; `plain` keeps the spacing with no surface. Set `title` to label the native `section`. `headingLevel` defaults to 2 and accepts 2, 3, or 4 so heading order remains correct. `headingId` can be set when a page needs a stable external reference. The title is omitted completely when empty.",
|
|
111
111
|
"examples": [
|
|
112
|
-
"ai/examples/edit-form.html"
|
|
113
|
-
"ai/examples/settings.html"
|
|
112
|
+
"ai/examples/edit-form.html"
|
|
114
113
|
]
|
|
115
114
|
},
|
|
116
115
|
"penpot": [
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"usageGuide": "guides/components/typography.md",
|
|
26
26
|
"usage": {
|
|
27
27
|
"summary": "GoodUI Typography supplies content structure and spacing without page-specific margin rules. The Penpot source is `12 Typography`; [typography-components.json](../../design/typography-components.json) maps every published component and variant to its Angular selector. The [homepage example](../../homepage/src/app/getting-started/typography.html) shows the system in use.",
|
|
28
|
-
"examples": [
|
|
28
|
+
"examples": [
|
|
29
|
+
"ai/examples/settings.html"
|
|
30
|
+
]
|
|
29
31
|
},
|
|
30
32
|
"penpot": [
|
|
31
33
|
{
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"usageGuide": "guides/components/typography.md",
|
|
28
28
|
"usage": {
|
|
29
29
|
"summary": "GoodUI Typography supplies content structure and spacing without page-specific margin rules. The Penpot source is `12 Typography`; [typography-components.json](../../design/typography-components.json) maps every published component and variant to its Angular selector. The [homepage example](../../homepage/src/app/getting-started/typography.html) shows the system in use.",
|
|
30
|
-
"examples": [
|
|
30
|
+
"examples": [
|
|
31
|
+
"ai/examples/settings.html"
|
|
32
|
+
]
|
|
31
33
|
},
|
|
32
34
|
"penpot": [
|
|
33
35
|
{
|
|
@@ -20,6 +20,30 @@
|
|
|
20
20
|
],
|
|
21
21
|
"source": "angular/projects/goodui/src/lib/typography.ts",
|
|
22
22
|
"kind": "input"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "layout",
|
|
26
|
+
"type": "\"settings\" | \"default\"",
|
|
27
|
+
"required": false,
|
|
28
|
+
"default": "default",
|
|
29
|
+
"allowedValues": [
|
|
30
|
+
"settings",
|
|
31
|
+
"default"
|
|
32
|
+
],
|
|
33
|
+
"source": "angular/projects/goodui/src/lib/typography.ts",
|
|
34
|
+
"kind": "input"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "appearance",
|
|
38
|
+
"type": "\"default\" | \"danger\"",
|
|
39
|
+
"required": false,
|
|
40
|
+
"default": "default",
|
|
41
|
+
"allowedValues": [
|
|
42
|
+
"default",
|
|
43
|
+
"danger"
|
|
44
|
+
],
|
|
45
|
+
"source": "angular/projects/goodui/src/lib/typography.ts",
|
|
46
|
+
"kind": "input"
|
|
23
47
|
}
|
|
24
48
|
],
|
|
25
49
|
"outputs": [],
|
|
@@ -27,6 +51,14 @@
|
|
|
27
51
|
"spacing": [
|
|
28
52
|
"default",
|
|
29
53
|
"content"
|
|
54
|
+
],
|
|
55
|
+
"layout": [
|
|
56
|
+
"settings",
|
|
57
|
+
"default"
|
|
58
|
+
],
|
|
59
|
+
"appearance": [
|
|
60
|
+
"default",
|
|
61
|
+
"danger"
|
|
30
62
|
]
|
|
31
63
|
},
|
|
32
64
|
"composition": {
|
|
@@ -43,7 +75,9 @@
|
|
|
43
75
|
"usageGuide": "guides/components/typography.md",
|
|
44
76
|
"usage": {
|
|
45
77
|
"summary": "GoodUI Typography supplies content structure and spacing without page-specific margin rules. The Penpot source is `12 Typography`; [typography-components.json](../../design/typography-components.json) maps every published component and variant to its Angular selector. The [homepage example](../../homepage/src/app/getting-started/typography.html) shows the system in use.",
|
|
46
|
-
"examples": [
|
|
78
|
+
"examples": [
|
|
79
|
+
"ai/examples/settings.html"
|
|
80
|
+
]
|
|
47
81
|
},
|
|
48
82
|
"penpot": [
|
|
49
83
|
{
|
|
@@ -52,6 +86,20 @@
|
|
|
52
86
|
"kind": "component",
|
|
53
87
|
"state": null,
|
|
54
88
|
"owner": null
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"penpotName": "goodui.section.settings",
|
|
92
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89e6cf3bc1",
|
|
93
|
+
"kind": "component",
|
|
94
|
+
"state": "settings",
|
|
95
|
+
"owner": null
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"penpotName": "goodui.section.settings-danger",
|
|
99
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89ecca52fa",
|
|
100
|
+
"kind": "component",
|
|
101
|
+
"state": "settings-danger",
|
|
102
|
+
"owner": null
|
|
55
103
|
}
|
|
56
104
|
],
|
|
57
105
|
"missing": {
|
|
@@ -64,6 +64,39 @@
|
|
|
64
64
|
"source": "angular/projects/goodui/src/lib/table.ts",
|
|
65
65
|
"kind": "input"
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
"name": "frameAppearance",
|
|
69
|
+
"type": "\"default\" | \"none\"",
|
|
70
|
+
"required": false,
|
|
71
|
+
"default": "default",
|
|
72
|
+
"allowedValues": [
|
|
73
|
+
"default",
|
|
74
|
+
"none"
|
|
75
|
+
],
|
|
76
|
+
"source": "angular/projects/goodui/src/lib/table.ts",
|
|
77
|
+
"kind": "input"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "density",
|
|
81
|
+
"type": "\"default\" | \"compact\"",
|
|
82
|
+
"required": false,
|
|
83
|
+
"default": null,
|
|
84
|
+
"allowedValues": [
|
|
85
|
+
"default",
|
|
86
|
+
"compact"
|
|
87
|
+
],
|
|
88
|
+
"source": "angular/projects/goodui/src/lib/table.ts",
|
|
89
|
+
"kind": "input"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "searchTerm",
|
|
93
|
+
"type": "string",
|
|
94
|
+
"required": false,
|
|
95
|
+
"default": "",
|
|
96
|
+
"allowedValues": null,
|
|
97
|
+
"source": "angular/projects/goodui/src/lib/table.ts",
|
|
98
|
+
"kind": "input"
|
|
99
|
+
},
|
|
67
100
|
{
|
|
68
101
|
"name": "reorderable",
|
|
69
102
|
"type": "boolean",
|
|
@@ -248,6 +281,14 @@
|
|
|
248
281
|
"striped",
|
|
249
282
|
"compact"
|
|
250
283
|
],
|
|
284
|
+
"frameAppearance": [
|
|
285
|
+
"default",
|
|
286
|
+
"none"
|
|
287
|
+
],
|
|
288
|
+
"density": [
|
|
289
|
+
"default",
|
|
290
|
+
"compact"
|
|
291
|
+
],
|
|
251
292
|
"sortingMode": [
|
|
252
293
|
"client",
|
|
253
294
|
"manual"
|
|
@@ -285,6 +326,20 @@
|
|
|
285
326
|
"kind": "component",
|
|
286
327
|
"state": null,
|
|
287
328
|
"owner": null
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"penpotName": "goodui.table.embedded-default",
|
|
332
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89ece41d55",
|
|
333
|
+
"kind": "component",
|
|
334
|
+
"state": "embedded-default",
|
|
335
|
+
"owner": null
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"penpotName": "goodui.table.embedded-compact",
|
|
339
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89ed012d9b",
|
|
340
|
+
"kind": "component",
|
|
341
|
+
"state": "embedded-compact",
|
|
342
|
+
"owner": null
|
|
288
343
|
}
|
|
289
344
|
],
|
|
290
345
|
"missing": {
|
package/ai/catalog/index.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "index.schema.json",
|
|
3
3
|
"package": "@cloudfrogger/goodui",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.75",
|
|
5
5
|
"generatedFrom": "angular/projects/goodui/src/public-api.ts",
|
|
6
6
|
"components": [
|
|
7
7
|
{
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
},
|
|
603
603
|
"usageGuide": "guides/components/group.md",
|
|
604
604
|
"summary": "`good-group` collects related content without the visual weight of a Card. It owns padding and a 16 px gap between projected children. Paragraphs and controls contribute no outer spacing, so a paragraph, Checkbox, RadioGroup, Select, or FormRow can be substituted without doubling that gap. Checkbox and radio choices retain 44 px touch targets inside their own bounds. `appearance=\"outline\"` (default) draws a quiet border and places an optional title in that border; `contrast` uses a soft theme-aware background; `plain` keeps the spacing with no surface. Set `title` to label the native `section`. `headingLevel` defaults to 2 and accepts 2, 3, or 4 so heading order remains correct. `headingId` can be set when a page needs a stable external reference. The title is omitted completely when empty.",
|
|
605
|
-
"penpotCount":
|
|
605
|
+
"penpotCount": 4
|
|
606
606
|
},
|
|
607
607
|
{
|
|
608
608
|
"selector": "good-group",
|
|
@@ -1226,7 +1226,7 @@
|
|
|
1226
1226
|
},
|
|
1227
1227
|
"usageGuide": "guides/components/typography.md",
|
|
1228
1228
|
"summary": "GoodUI Typography supplies content structure and spacing without page-specific margin rules. The Penpot source is `12 Typography`; [typography-components.json](../../design/typography-components.json) maps every published component and variant to its Angular selector. The [homepage example](../../homepage/src/app/getting-started/typography.html) shows the system in use.",
|
|
1229
|
-
"penpotCount":
|
|
1229
|
+
"penpotCount": 3
|
|
1230
1230
|
},
|
|
1231
1231
|
{
|
|
1232
1232
|
"selector": "good-select",
|
|
@@ -1442,7 +1442,7 @@
|
|
|
1442
1442
|
},
|
|
1443
1443
|
"usageGuide": "guides/components/table.md",
|
|
1444
1444
|
"summary": "`good-table` presents records in a native table with a consistent GoodUI frame, header, rows, optional search, and optional pagination. It uses TanStack Table for its row models and column definitions. Without `[pagination]`, all supplied rows remain visible and the table grows vertically with them. Narrow screens scroll the table horizontally inside its frame.",
|
|
1445
|
-
"penpotCount":
|
|
1445
|
+
"penpotCount": 3
|
|
1446
1446
|
},
|
|
1447
1447
|
{
|
|
1448
1448
|
"selector": "good-tabs",
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
<good-heading-1>Settings</good-heading-1>
|
|
3
3
|
<good-summary>Choose how you receive updates.</good-summary>
|
|
4
4
|
<form goodForm [formGroup]="form" (ngSubmit)="save()">
|
|
5
|
-
<good-
|
|
5
|
+
<good-section layout="settings">
|
|
6
|
+
<good-heading-group><good-heading-2>Notifications</good-heading-2><good-summary>Choose which updates to receive.</good-summary></good-heading-group>
|
|
6
7
|
<good-switch label="Email updates" [showLabel]="true" formControlName="emailUpdates" />
|
|
7
8
|
<good-switch label="Activity alerts" [showLabel]="true" formControlName="activityAlerts" />
|
|
8
|
-
</good-
|
|
9
|
+
</good-section>
|
|
9
10
|
<good-action-group><good-button type="submit">Save settings</good-button></good-action-group>
|
|
10
11
|
</form>
|
|
11
12
|
@if (saved()) { <good-paragraph>Settings saved in this demo.</good-paragraph> }
|
package/ai/examples/settings.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Component, signal } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
-
import { GoodActionGroupComponent, GoodButtonComponent, GoodFormDirective,
|
|
3
|
+
import { GoodActionGroupComponent, GoodButtonComponent, GoodFormDirective, GoodMainViewComponent, GoodParagraphComponent, GoodSwitchComponent, GoodHeading1Component, GoodSummaryComponent, GoodSectionComponent, GoodHeadingGroupComponent, GoodHeading2Component } from '@cloudfrogger/goodui';
|
|
4
4
|
@Component({
|
|
5
5
|
selector: 'app-settings-example', standalone: true,
|
|
6
|
-
imports: [ReactiveFormsModule, GoodMainViewComponent,
|
|
6
|
+
imports: [ReactiveFormsModule, GoodMainViewComponent, GoodFormDirective, GoodSwitchComponent, GoodActionGroupComponent, GoodButtonComponent, GoodParagraphComponent, GoodHeading1Component, GoodSummaryComponent, GoodSectionComponent, GoodHeadingGroupComponent, GoodHeading2Component],
|
|
7
7
|
templateUrl: './settings.html',
|
|
8
8
|
})
|
|
9
9
|
export class SettingsExample {
|
|
@@ -7,3 +7,9 @@
|
|
|
7
7
|
- **Duplicating shell spacing or heading markup:** Use MainView and Group ownership as described in `layout.md`.
|
|
8
8
|
- **Assuming every Penpot shape is a public selector:** `penpot.kind` distinguishes component and internal part; absent mappings are marked in `missing`.
|
|
9
9
|
- **Assuming a successful TypeScript build proves usability:** Check keyboard focus, form errors, dark theme, and narrow screens in a browser.
|
|
10
|
+
|
|
11
|
+
- **Assembling showcase specimens into a workflow:** Start with the closest complete example and preserve its useful hierarchy; use the catalog to verify the exact APIs.
|
|
12
|
+
- **Choosing controls before the composition:** Inspect the user's reference for region sizes, reading order, density, and action placement. A different widget exposing the same commands may still produce the wrong workflow.
|
|
13
|
+
- **Wrapping every block in another frame:** Give Section, Group, Card, and Table distinct jobs. Use an embedded Table without an extra frame when the enclosing section already establishes the context.
|
|
14
|
+
- **Shrinking headings to fit actions on mobile:** Preserve readable heading width and let the documented page/section action areas wrap. Check the rendered result with realistic text.
|
|
15
|
+
- **Calling a page finished after a build:** Apply the concrete visual and interaction checks in [Designing a GoodUI screen](../../guides/layout/screen-design.md); state any unavailable check.
|
package/ai/guides/layout.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Layout rules
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
For a new screen or substantial composition change, first read [Designing a GoodUI screen](../../guides/layout/screen-design.md). Choose hierarchy and a suitable complete example before looking up individual controls.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use `good-app-shell` for a full application shell. Its composition is AppShell → Sidebar / AppHeader / MainView. `good-main-view` owns the layout of projected headings, summary, eyebrow, actions, and content. Place `good-heading-1` and optional `good-summary` directly inside it; there are no title or description inputs. A single direct `good-heading-group` may instead contain the page heading and Summary; headings nested inside page Sections remain section content.
|
|
6
|
+
|
|
7
|
+
Choose one page pattern. For a centered content page, put `good-section` elements directly inside `good-main-view`; MainView aligns its heading and entire content area to the same 1024 px width. For a free full-width page, use no `good-section`; heading and content then begin at the same left edge. Do not mix direct Sections and free page content. A standard page title is projected through `good-heading-1`; MainView has no `title` input.
|
|
6
8
|
|
|
7
9
|
`good-main-view layout="page"` is the default and lets the page scroll. For a workspace that fills the client area below the topbar without outer padding, set `layout="fill"`, project one primary child, and let that child scroll internally. For `good-calendar`, also set `[fillHeight]="true"` for a flush frame. See `guides/layout/app-shell.md` and `homepage/src/app/examples/calendar-workspace/` for the complete pattern.
|
|
8
10
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Page patterns
|
|
2
2
|
|
|
3
|
+
Use [Designing a GoodUI screen](../../guides/layout/screen-design.md) to choose a composition, surface hierarchy, and action placement. Its reference table links complete application examples; the small snippets below are starting points rather than complete visual specifications.
|
|
4
|
+
|
|
3
5
|
Pick the page width before composing controls:
|
|
4
6
|
|
|
5
7
|
```html
|
|
@@ -32,7 +34,7 @@ Keep one pattern per page. In the centered pattern, put each top-level content b
|
|
|
32
34
|
| Sign in | MainView → Card → native form + Input + Button | `ai/examples/login.ts` and `.html` |
|
|
33
35
|
| Data overview | MainView → Table with typed columns, search and pagination | `ai/examples/table-view.ts` and `.html` |
|
|
34
36
|
| Edit record | MainView → native form + Group + FormRow + Input/Select + ActionGroup | `ai/examples/edit-form.ts` and `.html` |
|
|
35
|
-
| Settings | MainView →
|
|
37
|
+
| Settings | MainView → settings Section + HeadingGroup + native form + Switch + ActionGroup | `ai/examples/settings.ts` and `.html` |
|
|
36
38
|
|
|
37
39
|
The example app in `ai/examples/main.ts` renders all four pages. It compiles against the locally built library. Its demo handlers keep state in memory; add real persistence and authorization in the consuming application.
|
|
38
40
|
|
|
@@ -41,3 +43,7 @@ The example app in `ai/examples/main.ts` renders all four pages. It compiles aga
|
|
|
41
43
|
If the application uses `good-app-shell`, it already has the Notifications bell and one notification host. For maintenance notices, background jobs, and other messages a person may need to revisit, publish through `GoodNotificationCenter`; use `delivery: 'inbox'` when no toast should interrupt the page. Do not reproduce a reference screenshot's notification banner as an Expandable or permanent page Alert merely because it appears above the content. Read `guides/components/notifications.md` before implementing that part of a screen.
|
|
42
44
|
|
|
43
45
|
Keep a `good-alert` in page content when it explains the current task or a nearby field, such as a form validation error. Use a toast for brief action feedback when the user should see it immediately; choose `persist` according to whether it belongs in the bell history. Avoid publishing the same seeded message on every route visit.
|
|
46
|
+
|
|
47
|
+
## Settings overview and detail
|
|
48
|
+
|
|
49
|
+
Use MainView page actions for Edit, Cancel, and Save. Compose `good-section layout="settings"` with a projected HeadingGroup and `[good-section-actions]`; use `appearance="danger"` for a quiet archive section with an application-owned confirmation. `good-settings` is a shell header menu. Embed Tables with independent `frameAppearance="none"` and `density="compact"`; drive `[searchTerm]` from a small Input beside section actions. Repeated FormRows accept `[good-form-row-actions]` and keep domain validation and add/remove logic in the app. See `guides/components/typography.md`, `guides/components/table.md`, `guides/components/group.md`, and the complete `homepage/src/app/examples/settings/` example. Routes are `/examples/settings` and `/examples/settings/:id`; drafts are discarded by Cancel and saved only on valid submission.
|
package/ai/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@cloudfrogger/goodui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"sourceRevision": "
|
|
3
|
+
"version": "0.0.75",
|
|
4
|
+
"sourceRevision": "2432e021d8ace916f5a177a02dda3e2c627ba882",
|
|
5
5
|
"note": "References bundled with the npm package."
|
|
6
6
|
}
|
package/ai/skill/goodui/SKILL.md
CHANGED
|
@@ -5,13 +5,21 @@ description: Design linked GoodUI screens in Penpot, or build Angular screens wi
|
|
|
5
5
|
|
|
6
6
|
# GoodUI
|
|
7
7
|
|
|
8
|
+
## Design the screen as a whole
|
|
9
|
+
|
|
10
|
+
For a new screen or a substantial layout change, read `guides/layout/screen-design.md` from the matching reference root before composing it. Resolve paths using the package/GitHub rules below; design-only users can read the guide from the same GitHub revision as this skill. Inspect the supplied visual reference or the closest complete GoodUI example. Briefly identify the user task, reading order, main action, and narrow-screen priorities, then use those decisions to compose the page. Follow explicit user choices and established product design.
|
|
11
|
+
|
|
12
|
+
Keep surface and action hierarchy intentional: Sections structure the page, Groups collect related content, and Cards mark bounded units. Avoid redundant nested frames, equally prominent unrelated actions, and disabled forms used as read-only summaries. Containers own spacing; describe a verified reusable capability gap before substituting a local layout workaround. Apply these choices to the task rather than forcing every screen into the same recipe.
|
|
13
|
+
|
|
14
|
+
Inspect a representative rendered screen and its main interaction before repeating it across routes. Use the guide's concrete review criteria to check hierarchy, reference fidelity, alignment, responsive behavior, and relevant states in both themes. Correct visible problems before reporting completion. Report a missing browser/export check accurately; compilation alone does not establish visual quality. Continue within the user's authorized scope without introducing a design approval gate.
|
|
15
|
+
|
|
8
16
|
## Start with a Penpot design
|
|
9
17
|
|
|
10
18
|
For a design-only task, no Angular project or npm package is required. Use the available Penpot MCP connection to inspect the target file and the live shared GoodUI library. Ask for a missing file link or connection when it cannot be discovered. The skill itself does not install the Penpot library or configure MCP.
|
|
11
19
|
|
|
12
20
|
Compose linked GoodUI instances in the target file, reuse published variants and tokens, and inspect the rendered desktop and mobile designs. Keep domain-specific content in the consuming design. Do not create Angular code unless requested. If a reusable capability is missing, explain the gap before substituting an unrelated custom component.
|
|
13
21
|
|
|
14
|
-
If local GoodUI references are unavailable, read only the relevant design guides and mapping from `https://github.com/cloudfrogger/goodui`:
|
|
22
|
+
If local GoodUI references are unavailable, read only the relevant design guides and mapping from `https://github.com/cloudfrogger/goodui`: read `guides/layout/screen-design.md` for screen composition, `design.md` and `design/component-map.json` for the system contract, then the affected component guides under `guides/components/`. Use the live library to verify names, IDs, variants, and availability; repository references do not replace live inspection. When implementation begins, use the installed Angular package's matching references as described below.
|
|
15
23
|
|
|
16
24
|
## Find the matching Angular references
|
|
17
25
|
|
|
@@ -22,7 +30,7 @@ For a source checkout, use its root and `angular/projects/goodui/package.json`.
|
|
|
22
30
|
## Build an Angular screen
|
|
23
31
|
|
|
24
32
|
1. Read `ai/catalog/index.json` to find suitable selectors and import symbols. `ai/guides/component-discovery.md` explains how to find components, services, and exported types from a task description. Read only the relevant component detail files and linked guides. Catalog files record inputs, defaults, required values, outputs, model changes, projection slots, forms integration, and Penpot ownership. Use `angular/projects/goodui/src/public-api.ts` and the referenced source files for exported types, services, and behavior that needs clarification.
|
|
25
|
-
2.
|
|
33
|
+
2. Apply `guides/layout/screen-design.md`, then read `ai/guides/layout.md` and `ai/guides/page-patterns.md` for the selected page composition. Choose the shell and page layout before arranging controls. MainView owns page insets and heading alignment; Group, FormRow, Card, Columns, ActionGroup, and the workspace components own their layout. Prefer these capabilities and shared tokens when they satisfy the requested screen. Describe a missing reusable capability when the library cannot express the requested layout, and agree on the approach with the user.
|
|
26
34
|
3. Import public symbols from `@cloudfrogger/goodui` and global CSS from `@cloudfrogger/goodui/styles.css`. Check the app's root `provideGoodUI()` configuration and router. Use the catalog's exact inputs, outputs, projected slots, and Angular Forms integration. Keep domain data, persistence, and product-specific commands in the consuming application.
|
|
27
35
|
4. For configurable topbar actions, project `good-header-actions` into `good-app-header` inside AppShell and compose action components inside it. Read `guides/components/header-actions.md` and each child guide; configure projected children directly. For notifications, read `guides/components/notifications.md`. AppShell includes a notification host; AppHeader supplies a bell when it renders its default actions. A custom HeaderActions chooses whether to include the bell. Use `GoodNotificationCenter` for revisitable messages, an inline Alert for nearby task/form problems, and a transient toast for immediate feedback.
|
|
28
36
|
5. Use `ai/examples/` for small form, table, and settings patterns. Guides link to complete homepage examples when useful. For a named case study, read `ai/case-studies/index.md`, then that study and its relevant screen. Keep routine component work focused on its relevant references.
|
|
@@ -33,3 +41,5 @@ For a source checkout, use its root and `angular/projects/goodui/package.json`.
|
|
|
33
41
|
When the task includes Penpot, inspect the live GoodUI library and the target screen through the available Penpot MCP connection. Compose linked instances using the mapped names and variants, and inspect their rendered result. Use `design/component-map.json` and the catalog's Penpot ownership records to map them to Angular selectors. Internal parts belong to their public component. Keep any unpublished design status visible in your report. If the required connection or file access is missing, identify it before claiming a design change.
|
|
34
42
|
|
|
35
43
|
Repository: `https://github.com/cloudfrogger/goodui`.
|
|
44
|
+
|
|
45
|
+
For settings pages, use MainView and `good-section layout="settings"` with HeadingGroup and `[good-section-actions]`; `good-settings` remains a header menu. Use `appearance="danger"` for a quiet destructive section, an unframed Table (`frameAppearance="none"`) with independent `density`, external `[searchTerm]` beside actions, and `[good-form-row-actions]` for repeated fields. Keep draft state, validation, and persistence in the consuming app. Read `ai/guides/page-patterns.md` and the complete `homepage/src/app/examples/settings/` example.
|
|
@@ -38,7 +38,7 @@ export class GoodGroupComponent {
|
|
|
38
38
|
standalone: true,
|
|
39
39
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40
40
|
host: { class: 'good-form-row', '[attr.data-columns]': 'columns()' },
|
|
41
|
-
template: `<ng-content
|
|
41
|
+
template: `<ng-content /><div class="good-form-row-actions"><ng-content select="[good-form-row-actions]" /></div>`,
|
|
42
42
|
})
|
|
43
43
|
export class GoodFormRowComponent {
|
|
44
44
|
readonly columns = input<2 | 3>(2);
|
|
@@ -81,7 +81,7 @@ export interface GoodTableRequest {
|
|
|
81
81
|
host: { class: 'good-table', '[attr.data-column-dragging]': 'dragSourceId() ? "true" : null', '[attr.data-responsive-columns]': 'hasResponsiveColumns() ? "true" : null' },
|
|
82
82
|
template: `
|
|
83
83
|
<ng-content select="ng-template[goodTableCell]" />
|
|
84
|
-
<div #frame class="good-table-frame" [attr.data-style]="tableStyle() ?? style()" [attr.aria-busy]="loading() ? 'true' : null">
|
|
84
|
+
<div #frame class="good-table-frame" [attr.data-style]="tableStyle() ?? style()" [attr.data-frame]="frameAppearance()" [attr.data-density]="density() ?? ((tableStyle() ?? style()) === 'compact' ? 'compact' : 'default')" [attr.aria-busy]="loading() ? 'true' : null">
|
|
85
85
|
@if (searchable()) {
|
|
86
86
|
<div class="good-table-toolbar">
|
|
87
87
|
<good-input label="Search records" type="search" [startIcon]="searchIcon" [placeholder]="searchPlaceholder()"
|
|
@@ -213,6 +213,10 @@ export class GoodTableComponent<TData extends RowData> implements AfterViewInit
|
|
|
213
213
|
readonly style = input<GoodTableStyle>('default');
|
|
214
214
|
/** Prefer this name in templates: static style="compact" is interpreted as an HTML style attribute. */
|
|
215
215
|
readonly tableStyle = input<GoodTableStyle | null>(null);
|
|
216
|
+
readonly frameAppearance = input<'default' | 'none'>('default');
|
|
217
|
+
readonly density = input<'default' | 'compact' | null>(null);
|
|
218
|
+
/** External search, including when searchable=false. Uses the same filtering and request path. */
|
|
219
|
+
readonly searchTerm = input('');
|
|
216
220
|
/** Drag or use the header grips to reorder columns; enabled by default. */
|
|
217
221
|
readonly reorderable = input(true, { transform: booleanAttribute });
|
|
218
222
|
/** Optional controlled order of leaf column IDs; emits changes from user reordering. */
|
|
@@ -342,6 +346,7 @@ export class GoodTableComponent<TData extends RowData> implements AfterViewInit
|
|
|
342
346
|
});
|
|
343
347
|
|
|
344
348
|
constructor() {
|
|
349
|
+
effect(() => { const term = this.searchTerm(); untracked(() => this.setSearch(term)); });
|
|
345
350
|
effect(() => {
|
|
346
351
|
this.columns();
|
|
347
352
|
const width = this.tableWidth();
|
|
@@ -85,10 +85,13 @@ export class GoodSummaryComponent {}
|
|
|
85
85
|
|
|
86
86
|
@Component({
|
|
87
87
|
selector: 'good-section', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
88
|
-
host: { class: 'good-section', '[attr.data-spacing]': 'spacing()'
|
|
88
|
+
host: { class: 'good-section', '[attr.data-spacing]': 'spacing()', '[attr.data-layout]': 'layout()', '[attr.data-appearance]': 'appearance()' },
|
|
89
|
+
template: `<section><ng-content /></section>`,
|
|
89
90
|
})
|
|
90
91
|
export class GoodSectionComponent {
|
|
91
92
|
readonly spacing = input<'default' | 'content'>('default');
|
|
93
|
+
readonly layout = input<'default' | 'settings'>('default');
|
|
94
|
+
readonly appearance = input<'default' | 'danger'>('default');
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
@Component({
|
|
@@ -703,8 +703,8 @@ good-heading-group, good-eyebrow, good-heading-1, good-heading-2, good-heading-3
|
|
|
703
703
|
.good-table-scroll tbody tr[data-selected="true"] td:first-child { box-shadow: inset 3px 0 0 var(--good-color-accent); }
|
|
704
704
|
.good-table-scroll tbody tr[data-row-id] { cursor: pointer; }
|
|
705
705
|
.good-table-scroll tbody tr[data-row-id]:focus-visible { outline: 2px solid var(--good-color-accent); outline-offset: -2px; }
|
|
706
|
-
.good-table-frame[data-
|
|
707
|
-
.good-table-frame[data-
|
|
706
|
+
.good-table-frame[data-density="compact"] .good-table-scroll :is(th, td) { padding: var(--good-table-compact-padding-block) var(--good-table-compact-padding-inline); }
|
|
707
|
+
.good-table-frame[data-density="compact"] .good-table-scroll td { height: var(--good-table-compact-row-height); }
|
|
708
708
|
.good-table-empty { display: flex; min-height: var(--good-table-empty-min-height); flex-direction: column; align-items: center; justify-content: center; gap: var(--good-space-2); color: var(--good-table-muted); text-align: center; }
|
|
709
709
|
.good-table-empty svg { color: var(--good-table-empty-icon); }
|
|
710
710
|
.good-table-empty strong { font-size: 13px; font-weight: 600; }
|
|
@@ -1137,3 +1137,31 @@ good-heading-group, good-eyebrow, good-heading-1, good-heading-2, good-heading-3
|
|
|
1137
1137
|
|
|
1138
1138
|
.good-sidebar-item > button.good-submenu-link { width: 100%; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
|
|
1139
1139
|
.good-sidebar-item > .good-submenu-link .good-icon { width: 16px; height: 16px; color: var(--good-icon); }
|
|
1140
|
+
|
|
1141
|
+
/* Sections retain content order; settings headers and actions share a wrapping row. */
|
|
1142
|
+
.good-section[data-layout="settings"] > section { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: var(--good-space-6) var(--good-space-4); padding-block: var(--good-space-6); border-bottom: 1px solid var(--good-color-border); }
|
|
1143
|
+
.good-section[data-layout="settings"] > section > * { flex: 1 0 100%; min-width: 0; max-width: 100%; margin-block-start: 0; }
|
|
1144
|
+
.good-section[data-layout="settings"] > section > good-heading-group { flex: 1; min-width: min(100%, 240px); }
|
|
1145
|
+
.good-section[data-layout="settings"] > section > [good-section-actions] { flex: 0 1 auto; min-width: 0; max-width: 100%; }
|
|
1146
|
+
.good-section[data-layout="settings"] > section > good-input[good-section-actions], .good-section[data-layout="settings"] > section > [good-section-actions] good-input { width: min(100%, var(--good-table-search-width)); }
|
|
1147
|
+
.good-section[data-layout="settings"] > section > .good-action-group[good-section-actions] { width: max-content; }
|
|
1148
|
+
.good-section[data-layout="settings"] + .good-section[data-layout="settings"] { margin-block-start: 0; }
|
|
1149
|
+
.good-section[data-layout="settings"] > section > good-heading-group .good-summary p { font-size: var(--good-typography-paragraph-font-size); font-weight: var(--good-typography-paragraph-font-weight); letter-spacing: normal; }
|
|
1150
|
+
.good-section[data-appearance="danger"] > section > good-heading-group :is(h1, h2, h3, h4, h5, h6, [role="heading"]) { color: var(--good-alert-destructive-color); }
|
|
1151
|
+
.good-section[data-appearance="danger"] > section { border-bottom: 0; }
|
|
1152
|
+
.good-table-frame[data-frame="none"] { border: 0; border-radius: 0; background: transparent; }
|
|
1153
|
+
.good-form-row-actions:empty { display: none; }
|
|
1154
|
+
.good-form-row:has(> .good-form-row-actions:not(:empty)) { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
|
|
1155
|
+
.good-form-row[data-columns="3"]:has(> .good-form-row-actions:not(:empty)) { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
|
|
1156
|
+
.good-form-row-actions { display: flex; gap: var(--good-space-2); padding-top: calc(var(--good-typography-label-font-size) * 1.4 + var(--good-typography-field-label-gap)); }
|
|
1157
|
+
@container (max-width: 700px) {
|
|
1158
|
+
.good-form-row[data-columns="3"]:has(> .good-form-row-actions:not(:empty)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1159
|
+
.good-form-row[data-columns="3"] > .good-form-row-actions { justify-self: end; }
|
|
1160
|
+
}
|
|
1161
|
+
@container (max-width: 500px) {
|
|
1162
|
+
.good-form-row-actions { padding-top: 0; justify-self: end; }
|
|
1163
|
+
}
|
|
1164
|
+
@media (max-width: 640px) {
|
|
1165
|
+
.good-main-view-heading { flex-direction: column; align-items: stretch; gap: var(--good-space-4); }
|
|
1166
|
+
.good-main-view-actions { max-width: 100%; }
|
|
1167
|
+
}
|
|
@@ -2188,6 +2188,48 @@
|
|
|
2188
2188
|
"angularSelector": "good-header-actions",
|
|
2189
2189
|
"kind": "component",
|
|
2190
2190
|
"state": "search-hotkey"
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"penpotName": "goodui.section.settings",
|
|
2194
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89e6cf3bc1",
|
|
2195
|
+
"angularSelector": "good-section",
|
|
2196
|
+
"kind": "component",
|
|
2197
|
+
"state": "settings"
|
|
2198
|
+
},
|
|
2199
|
+
{
|
|
2200
|
+
"penpotName": "goodui.section.settings-danger",
|
|
2201
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89ecca52fa",
|
|
2202
|
+
"angularSelector": "good-section",
|
|
2203
|
+
"kind": "component",
|
|
2204
|
+
"state": "settings-danger"
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
"penpotName": "goodui.table.embedded-default",
|
|
2208
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89ece41d55",
|
|
2209
|
+
"angularSelector": "good-table",
|
|
2210
|
+
"kind": "component",
|
|
2211
|
+
"state": "embedded-default"
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
"penpotName": "goodui.table.embedded-compact",
|
|
2215
|
+
"penpotId": "489901a3-7f15-8049-8008-fc89ed012d9b",
|
|
2216
|
+
"angularSelector": "good-table",
|
|
2217
|
+
"kind": "component",
|
|
2218
|
+
"state": "embedded-compact"
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"penpotName": "goodui.form-row.3-actions",
|
|
2222
|
+
"penpotId": "489901a3-7f15-8049-8008-fc8a65b2f013",
|
|
2223
|
+
"angularSelector": "good-form-row",
|
|
2224
|
+
"kind": "component",
|
|
2225
|
+
"state": "3-actions"
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
"penpotName": "goodui.form-row.3-actions-mobile",
|
|
2229
|
+
"penpotId": "489901a3-7f15-8049-8008-fc8a672942eb",
|
|
2230
|
+
"angularSelector": "good-form-row",
|
|
2231
|
+
"kind": "component",
|
|
2232
|
+
"state": "3-actions-mobile"
|
|
2191
2233
|
}
|
|
2192
2234
|
],
|
|
2193
2235
|
"variantManifests": [
|
|
@@ -2229,7 +2271,8 @@
|
|
|
2229
2271
|
"design/rich-text-contract.json",
|
|
2230
2272
|
"design/color-controls-contract.json",
|
|
2231
2273
|
"design/world-map-contract.json",
|
|
2232
|
-
"design/header-search-variants.json"
|
|
2274
|
+
"design/header-search-variants.json",
|
|
2275
|
+
"design/settings-layout-contract.json"
|
|
2233
2276
|
],
|
|
2234
2277
|
"angularSelectorOverrides": {
|
|
2235
2278
|
"main-menu": "good-header-actions",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"sharedByBothVariants": true
|
|
30
30
|
},
|
|
31
31
|
"composition": {
|
|
32
|
+
"page": "45 Sidebars and Menus",
|
|
33
|
+
"pageId": "ffd8177e-90f6-8061-8008-fc9af9f40969",
|
|
32
34
|
"id": "4c1f5233-504c-80ed-8008-fb5c51acce40",
|
|
33
35
|
"family": "goodui.main-menu.search-hotkey",
|
|
34
36
|
"selector": "good-header-actions",
|