diff --git a/.changeset/36410-navigation-overlay-comments-prop.md b/.changeset/36410-navigation-overlay-comments-prop.md new file mode 100644 index 00000000000..e8ed6f7cf38 --- /dev/null +++ b/.changeset/36410-navigation-overlay-comments-prop.md @@ -0,0 +1,18 @@ +--- +'@object-ui/components': patch +--- + +fix(components)!: `NavigationOverlay` drops its `comments` prop, which no caller fills + +Clause-②: yes (narrowing) +Metadata-protocol: none + + + +**BREAKING** for a host that passed `NavigationOverlay` its `comments` prop. + +The record drawer took a comments switch and handed it to its top bar, ahead of the record's button group. Since the console stopped offering comments in the drawer, nothing passes it: a record's comments live on its full page, whose own bar draws the switch. The prop is removed so the drawer no longer advertises a slot no caller fills. `RecordTopBar` keeps its own `comments` slot: the record page fills it on the desktop and on a phone. + +What leaves, and what to write instead: + +- FROM `NavigationOverlayProps.comments` TO nothing, in the components package: the drawer's bar draws no comments switch. Fix: delete `comments` from the `NavigationOverlay` call; to show a record's comments, open its full page (the drawer's ⤢), where the bar draws the switch. diff --git a/ui/packages/components/src/__tests__/navigation-overlay-bar-26679.test.tsx b/ui/packages/components/src/__tests__/navigation-overlay-bar-26679.test.tsx index cf379461a51..804473d1e5a 100644 --- a/ui/packages/components/src/__tests__/navigation-overlay-bar-26679.test.tsx +++ b/ui/packages/components/src/__tests__/navigation-overlay-bar-26679.test.tsx @@ -123,3 +123,13 @@ describe('↑ ↓ step through the host set (ruling 3 keeps the controls)', () = expect(onPrevious).not.toHaveBeenCalled(); }); }); + +describe('the drawer bar takes no comments switch (objectstack#36410)', () => { + it('`comments` is not a NavigationOverlay prop, and a stray one is not drawn', () => { + // @ts-expect-error `comments` left NavigationOverlayProps: the record's comments live on its full page + const stray: Partial = { comments: