@assembly-js/app-foundation 0.0.16 → 0.0.17
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/package.json
CHANGED
|
@@ -70,20 +70,6 @@ useAssemblyHeader({ onRootClick: goHome, breadcrumbs: [{ label: 'Reports' }] });
|
|
|
70
70
|
|
|
71
71
|
Use breadcrumbs only for hierarchical navigation, not branding. A flat one-page app omits `breadcrumbs` (or passes `[]`). A multi-level app uses one entry per level: `[{ label: 'Reports' }, { label: 'Q4 2026' }]`. A breadcrumb's `onClick` makes it clickable; omit it for the current/leaf level.
|
|
72
72
|
|
|
73
|
-
## Loading state on a `primaryCta` — no `disabled`/`loading` prop
|
|
74
|
-
|
|
75
|
-
Header CTAs have no `disabled` or `loading` prop. Indicate progress by changing the `primaryCta` value itself — swap the label and replace `onClick` with a no-op while the action runs, then restore both when it completes:
|
|
76
|
-
|
|
77
|
-
```tsx
|
|
78
|
-
useAssemblyHeader({
|
|
79
|
-
primaryCta: isSaving
|
|
80
|
-
? { label: 'Saving…', icon: 'Check', onClick: () => {} }
|
|
81
|
-
: { label: 'Save', icon: 'Check', onClick: save },
|
|
82
|
-
});
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Because the hook re-applies whatever value you pass on every render, this is just a state change — no imperative set/clear needed. Don't let the user click a button and see nothing happen.
|
|
86
|
-
|
|
87
73
|
## Icon and color constraints
|
|
88
74
|
|
|
89
75
|
- **`icon` must be a `CtaIcon`** — the only valid values are `'Archive' | 'Plus' | 'Templates' | 'Trash' | 'Check'`. Any other string (e.g. `'Download'`, `'Settings'`, `'Edit'`) is a type error — omit the icon (it's optional) when none fit.
|
|
@@ -69,10 +69,6 @@ await assembly.updateClient({
|
|
|
69
69
|
|
|
70
70
|
Send the structured object — a bare string is accepted for backwards compatibility with older data, but it collapses to a single `fullAddress` string and loses city/region/postal code/country as separate values. Every property is optional except that the field is only considered set if `country` or `fullAddress` is non-empty; `fullAddress` is derived automatically from the other components if you omit it.
|
|
71
71
|
|
|
72
|
-
## Every other field type
|
|
73
|
-
|
|
74
|
-
Non-option, non-address fields take a direct string value — stringify numbers and booleans yourself: `{ mrr: '5000' }`, not `{ mrr: 5000 }`.
|
|
75
|
-
|
|
76
72
|
## Symptoms when it goes wrong
|
|
77
73
|
|
|
78
74
|
| Mistake | What you'll see |
|
|
@@ -21,6 +21,6 @@ tail -n 100 /tmp/dev-server.log
|
|
|
21
21
|
grep -n "Error" /tmp/dev-server.log
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Read or grep the file directly — it's a plain text file on the sandbox's own filesystem, not something fetched over a tool call. The file
|
|
24
|
+
Read or grep the file directly — it's a plain text file on the sandbox's own filesystem, not something fetched over a tool call. The file persists across dev server restarts — each restart appends a `=== dev server launch <timestamp> ===` marker, so you can see output from before a restart (earlier crashes, port-bind failures) and tell launches apart. Size is capped automatically, so `tail` always shows recent activity; it does not accumulate forever.
|
|
25
25
|
|
|
26
26
|
If the log doesn't explain the symptom (e.g. a client-side rendering issue), the problem is likely in the browser, not the server — this file only covers the server side.
|