Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/7798-getdataconfig-doc-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
---

Point the two `@example` blocks that still taught `getDataConfig(schema)` at the
shared record-source producer `resolveRecordSourceConfig(schema)` from
`@object-ui/core` (objectui#7798): the `useNavigationOverlay` block in
`packages/react/src/hooks/useNavigationOverlay.ts` and the
`resolveRecordSourceObjectName` block in `packages/core/src/utils/record-source.ts`.

`getDataConfig` is exported by nothing. It survives only as a file-local wrapper in
`plugin-map` and `plugin-grid` — and both of those already delegate their ladder to
`resolveRecordSourceConfig`, keeping only the array shorthand above it — so a reader
outside those two files could not write the line either example taught: there was no
module to import it from. The examples now spell `dataConfig` the way the live call
sites spell it (`plugin-calendar`, `plugin-tree`), which is the same judgement PR #7797
applied to `navigation-overlay.tsx`: follow the live call sites, not another doc block.
The `useNavigationOverlay` example also names the import, so the line it teaches is
copyable as written.

Doc comments only; no published behaviour changes and no package is released by this
change, so the frontmatter is empty.
2 changes: 1 addition & 1 deletion packages/core/src/utils/record-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import type { ViewData } from '@object-ui/types';
*
* @example
* ```ts
* const dataConfig = useMemo(() => getDataConfig(schema), [schema]);
* const dataConfig = useMemo(() => resolveRecordSourceConfig(schema), [schema]);
* const objectName = resolveRecordSourceObjectName(schema, dataConfig);
* ```
*/
Expand Down
7 changes: 6 additions & 1 deletion packages/react/src/hooks/useNavigationOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ export interface NavigationOverlayState {
*
* @example
* ```tsx
* const dataConfig = useMemo(() => getDataConfig(schema), [schema]);
* import {
* resolveRecordSourceConfig,
* resolveRecordSourceObjectName,
* } from '@object-ui/core';
*
* const dataConfig = useMemo(() => resolveRecordSourceConfig(schema), [schema]);
* const { handleClick, isOpen, selectedRecord, mode, close, width } =
* useNavigationOverlay({
* navigation: schema.navigation,
Expand Down
Loading