diff --git a/CLAUDE.md b/CLAUDE.md index 913e537..279c1d4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -224,6 +224,7 @@ See `examples/manifest-demo/manifest.json` for a fuller reference and `docs/migr 5. **Run `npm test` before submitting changes** 6. **CSS class prefix**: All classes use `cn-` prefix to avoid collisions 7. **Theming**: Use Nextcloud CSS variables only (`var(--color-primary-element)`, `var(--color-border)`, etc.). Do NOT reference `--nldesign-*` variables — the nldesign app overrides Nextcloud's own variables, so theming works automatically. +8. **Always update docs when you add, rename, or remove a prop, event, or slot** — edit `docs/components/cn-.md` in the same change. The CI `check:docs` step (run via `npm run check:docs`) verifies both that a doc file exists AND that every SFC prop and named slot appears in it. Run it locally before committing to catch gaps. ## Adding New Components diff --git a/docs/components/cn-advanced-form-dialog.md b/docs/components/cn-advanced-form-dialog.md index 207eef8..38c830e 100644 --- a/docs/components/cn-advanced-form-dialog.md +++ b/docs/components/cn-advanced-form-dialog.md @@ -35,7 +35,7 @@ The dialog uses the same **two-phase pattern** as other CRUD dialogs: after the |------|------|---------|-------------| | `schema` | Object | `null` | JSON Schema used to derive property list, types, and labels (e.g. `schema.properties`, `schema.required`, `schema.title`) | | `item` | Object | `null` | Existing object for edit mode; `null` for create mode | -| `dialogTitle` | String | `''` | Override dialog title; default is "Create {schemaTitle}" or "Edit {schemaTitle}" | +| `dialogTitle` | String | `''` | Override dialog title; default is "Create \{schemaTitle\}" or "Edit \{schemaTitle\}" | | `nameField` | String | `'title'` | Property used as display name (e.g. in breadcrumbs or other UI) | | `successText` | String | `''` | Message shown in result phase on success; default "\{schemaTitle\} saved successfully." | | `cancelLabel` | String | `'Cancel'` | Label for cancel button in form phase | @@ -66,11 +66,11 @@ The dialog uses the same **two-phase pattern** as other CRUD dialogs: after the | Slot | Scope | Description | |------|-------|-------------| -| `#form` | formData, updateField, objectProperties, jsonData, updateJsonFromExternal, isValidJson | Replace the entire form content (all tabs). Use for fully custom UI while still using the dialog chrome and confirm/close flow. | +| `#form` | formData, updateField, objectProperties, jsonData, updateJson, isValidJson | Replace the entire form content (all tabs). Use for fully custom UI while still using the dialog chrome and confirm/close flow. | | `#register-schema-selection` | proceed | Optional step before the main tabs (e.g. choose register/schema). When this slot is provided, the main tabs are not shown until the consumer calls `proceed()`. | | `#tab-properties` | formData, updateField, objectProperties, selectedProperty, handleRowClick, getPropertyDisplayName, getPropertyValidationClass, isPropertyEditable, validationDisplay | Override the Properties tab content. Default is the built-in properties table. | | `#tab-metadata` | item, formData | Override the Metadata tab content. Default is a table with ID, Created, Updated. | -| `#tab-data` | jsonData, updateJsonFromExternal, isValid, formatJSON | Override the Data (JSON) tab content. Default is CodeMirror + "Format JSON" button. | +| `#tab-data` | jsonData, updateJson, isValid, formatJSON | Override the Data (JSON) tab content. Default is CodeMirror + "Format JSON" button. | | `#actions-left` | — | Content to the left of the Cancel/Close button in the dialog footer | | `#actions-right` | — | Content to the right of the primary Confirm button in the dialog footer | @@ -188,9 +188,9 @@ async onConfirm(payload) { ```vue -