Skip to content

docs: add i18n integration guide and customisation reference#3

Open
rubenvdlinde wants to merge 77 commits intomainfrom
docs/i18n-and-customization-guides
Open

docs: add i18n integration guide and customisation reference#3
rubenvdlinde wants to merge 77 commits intomainfrom
docs/i18n-and-customization-guides

Conversation

@rubenvdlinde
Copy link
Contributor

Summary

  • docs/integrations/i18n.md — Complete i18n integration guide:

    • Library's prop-based translation strategy (i18n-agnostic, no internal @nextcloud/l10n calls)
    • Setting up @nextcloud/l10n in consumer apps with l10n/en.json and l10n/nl.json
    • Recommended src/i18n.js composable pattern
    • Full per-component translatable props reference table
  • docs/architecture/customization.md — Full customisation reference for CnIndexPage:

    • Extension points overview (ASCII tree of all slots)
    • Row action menu: actions prop + #row-actions slot
    • Actions dropdown: #action-items, #mass-actions, #header-actions
    • Custom cell renderers: #column-{key} slot
    • Form field overrides: #field-{key}, #before-fields, #after-fields
    • Dialog replacements: #form-dialog, #delete-dialog, #copy-dialog
    • Composing sub-components (CnDataTable + CnRowActions) directly

Test plan

  • Docusaurus builds without errors (cd docusaurus && npm run ci)
  • i18n page renders correctly in the docs site
  • Customisation page renders correctly with code blocks
  • Sidebar order remains correct (Integrations → i18n, Architecture → Customisation)

🤖 Generated with Claude Code

rubenvdlinde and others added 30 commits March 3, 2026 10:21
- docs/integrations/i18n.md — explains the library's prop-based
  translation strategy (i18n-agnostic, no internal l10n calls),
  covers @nextcloud/l10n setup, l10n JSON file format, recommended
  i18n.js composable pattern, and a full per-component translatable
  props reference table
- docs/architecture/customization.md — covers all slot-based
  extension points for CnIndexPage: row action menu (actions prop
  + #row-actions slot), Actions dropdown (#action-items), mass
  actions (#mass-actions), header buttons (#header-actions), custom
  cell renderers (#column-{key}), form field overrides
  (#field-{key} / #before-fields / #after-fields), dialog
  replacements (#form-dialog / #delete-dialog), and composing
  sub-components directly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add documentation for every undocumented or partially-documented
customisation point found in the component analysis:

- Props reference tables (page header, layout, mass actions, columns,
  form fields) — covers show-title, icon, description, row-key,
  row-class, inline-action-count, show-view-toggle, add-label,
  show-mass-*, mass-action-name-field, export-formats, import-options
- Events reference table listing all 17 emitted events
- Card view customisation — #card, #card-badges, #card-actions slots
  and view-mode / show-view-toggle props
- Dynamic row styling via row-class prop with CSS example
- Two-phase dialog pattern — explain confirm → async work → setResult
  flow; document all 7 setXResult() methods and setValidationErrors()
- Programmatic dialog control via openFormDialog(null|row)
- Import dialog #import-fields slot with file scope variable
- Sidebar #search-extra and #columns-extra slot examples
- Inline-action-count examples (controlling overflow behaviour)
- CnDataTable and CnPagination direct-composition props tables
  including scrollable, page-size-options, min-items-to-show,
  page-info-format, and row-class on CnDataTable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New prop `defaultTab` (default: 'search-tab') — sets the active tab
  when the sidebar first opens. Accepts any NcAppSidebarTab id, both
  built-in ('search-tab', 'columns-tab') and custom.
- New slot `#tabs` — consumers inject additional NcAppSidebarTab
  components; use order ≥ 3 to place them after the built-ins.
- New event `tab-change` — emitted with the tab id whenever the user
  switches tabs, allowing the parent to persist the choice.
- Binds NcAppSidebar's :active prop and @update:active to track the
  currently open tab internally.
- Update cn-index-sidebar.md props/events/slots tables.
- Update customization.md with sidebar tabs section (default-tab,
  custom tabs via #tabs slot, per-tab content via #search-extra /
  #columns-extra).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds css/index.css at the package root so consumers can import
'@conduction/nextcloud-vue/css/index.css' when installed via npm.
Previously only src/css/index.css existed, causing ESLint import/no-unresolved
failures in procest and pipelinq CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ore integration

Adds a new string-first API to both composables that connects directly to
useObjectStore, eliminating ~150 LOC of boilerplate from every list view
and ~80 LOC from every detail view.

useListView(objectType, options?):
- Accepts objectType string + options: { sidebarState, defaultPageSize,
  defaultSort, debounceMs }
- Returns schema, objects, loading, pagination as computed refs from the
  store, plus onSearch (debounced), onSort, onFilterChange, onPageChange,
  onPageSizeChange, refresh
- Handles fetchSchema, fetchCollection, sidebar wiring, and cleanup
  automatically in onMounted / onBeforeUnmount
- Backward compatible: existing useListView(options) calls unchanged

useDetailView(objectType, id, options?):
- Accepts objectType + id (string or Ref) + options: { router,
  listRouteName, detailRouteName }
- Returns object, isNew, loading, saving, editing, showDeleteDialog,
  error, validationErrors, onSave, confirmDelete
- Handles fetch on mount, id-change watcher, create/update/delete with
  optional router navigation and 422 validation error unpacking
- Backward compatible: existing useDetailView(options) calls unchanged

Also rewrites the composables documentation to reflect the new API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and-code

fixed store to use baseUrl + updated docs to show defaults
- fetch tags
- delete multiple objects by type and id
Add `userIsAdmin` prop to CnIndexSidebar and CnFacetSidebar, and extend
`filtersFromSchema()` with `isAdmin` and `filterFn` options. Schema
properties with `adminOnly: true` are now hidden from non-admin users,
enabling role-based filter visibility without consumer-side logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
I also added a extra slot to be able to more accurately reproduce the original page layout.
todo:
- add this as an "add" option in the CnIndexPage
- test test test
fixed issues with table not being scrollable
todo:
- add this as an "add" option in the CnIndexPage
- test test test
…CnWidgetWrapper, CnWidgetRenderer, CnTileWidget) + useDashboardView composable + simplify filtersFromSchema
…-page

added refreshing to Action Bar. added showZeroCount to Stats Block.
* feat: Add below-header slot to CnIndexPage and adjust header-actions position

Adds a new slot between the page header and actions bar to support content like status banners or alerts. Also repositions the header-actions slot in CnActionsBar to appear before the actions menu.

* added generic tabbed form dialog

* use TabbedForm as base for SchemaForm
SudoThijn
SudoThijn previously approved these changes Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants