Repository navigation
[all components] Correct inaccurate prop JSDoc - #5036
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,171.96 ms -3.35 ms(-0.3%) | Renders: 50 (+0) | Paint: 1,775.62 ms +20.84 ms(+1.2%)
10 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
34207cd to
386bd19
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates public API JSDoc across multiple React components and regenerates the corresponding docs API reference pages so the published prop/type descriptions match the actual runtime behavior (notably trigger-derived state, actionsRef.unmount, disablePointerDismissal, and popup focus behavior).
Changes:
- Correct trigger state docs so
openreflects “open and opened by this trigger” (derived fromisOpenedByTrigger) anddisabledreflects the trigger. - Reword
actionsRefunmountdocs to describe manual unmounting after closing animations. - Fix/clarify
disablePointerDismissalandinitialFocus/finalFocusdocumentation; add documentation forcreateAlertDialogHandle.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/tooltip/trigger/TooltipTrigger.tsx | Updates TooltipTriggerState.open JSDoc to reflect trigger-derived open state. |
| packages/react/src/select/root/SelectRoot.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/preview-card/trigger/PreviewCardTrigger.tsx | Updates trigger state JSDoc for trigger-derived open state. |
| packages/react/src/popover/trigger/PopoverTrigger.tsx | Corrects trigger state JSDoc for disabled and trigger-derived open. |
| packages/react/src/popover/root/PopoverRoot.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/popover/popup/PopoverPopup.tsx | Clarifies initialFocus/finalFocus behavior, including touch default and null fallback. |
| packages/react/src/menu/trigger/MenuTrigger.tsx | Updates trigger state JSDoc for trigger-derived open state. |
| packages/react/src/menu/root/MenuRoot.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/drawer/trigger/DrawerTrigger.tsx | Corrects trigger state JSDoc for disabled and trigger-derived open. |
| packages/react/src/drawer/root/DrawerRoot.tsx | Fixes disablePointerDismissal description and rewords actionsRef.unmount JSDoc. |
| packages/react/src/dialog/trigger/DialogTrigger.tsx | Corrects trigger state JSDoc for disabled and trigger-derived open. |
| packages/react/src/dialog/root/DialogRoot.tsx | Fixes disablePointerDismissal description and rewords actionsRef.unmount JSDoc. |
| packages/react/src/dialog/popup/DialogPopup.tsx | Clarifies initialFocus/finalFocus behavior, including touch default and null fallback. |
| packages/react/src/combobox/root/ComboboxRoot.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/combobox/root/AriaCombobox.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/autocomplete/root/AutocompleteRoot.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/alert-dialog/root/AlertDialogRoot.tsx | Rewords actionsRef.unmount JSDoc for manual unmounting after animations. |
| packages/react/src/alert-dialog/handle.ts | Adds JSDoc for createAlertDialogHandle. |
| docs/src/app/(docs)/react/components/tooltip/types.md | Regenerates docs types for updated trigger state description. |
| docs/src/app/(docs)/react/components/select/types.md | Regenerates docs props table for updated actionsRef description. |
| docs/src/app/(docs)/react/components/preview-card/types.md | Regenerates docs types for updated trigger state description. |
| docs/src/app/(docs)/react/components/popover/types.md | Regenerates docs for actionsRef, trigger state, and popup focus props. |
| docs/src/app/(docs)/react/components/menu/types.md | Regenerates docs for actionsRef and trigger state description. |
| docs/src/app/(docs)/react/components/drawer/types.md | Regenerates docs for actionsRef, disablePointerDismissal, and trigger state. |
| docs/src/app/(docs)/react/components/dialog/types.md | Regenerates docs for actionsRef, disablePointerDismissal, trigger state, and popup focus props. |
| docs/src/app/(docs)/react/components/context-menu/types.md | Regenerates docs for actionsRef wording in context-menu root/submenu tables. |
| docs/src/app/(docs)/react/components/combobox/types.md | Regenerates docs props table for updated actionsRef description. |
| docs/src/app/(docs)/react/components/autocomplete/types.md | Regenerates docs props table for updated actionsRef description. |
| docs/src/app/(docs)/react/components/alert-dialog/types.md | Regenerates docs (including createHandle text) for updated JSDoc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Corrects inaccurate public prop JSDoc across components (regenerated API reference included). Same rot, fixed everywhere it appears rather than only in Dialog/AlertDialog.
actionsRef→unmount(Dialog, AlertDialog, Drawer, Popover, Menu, Select, Combobox, Autocomplete) — the bullet claimed that providing the ref prevents unmount on close (it doesn't). Reworded to make clear thatunmount()manually unmounts immediately and should be called after externally controlled closing animations finish.disablePointerDismissal(Dialog, Drawer) — the description was inverted, and omitted that for non-modal popups it also disables closing on focus-out.openistrueonly when the popup is open and was opened by that trigger (the state is derived fromisOpenedByTrigger);disabledreflects the trigger, not the popup. Triggers whoseopenreflects the actual popup open state (Select, Combobox, Autocomplete, submenu, context menu, accordion/collapsible) were left unchanged.Dialog.Popup/Popover.PopupinitialFocus/finalFocus— document thenull-fallback and the touch default (the popup itself is focused on touch to avoid opening the virtual keyboard).createAlertDialogHandle.Supersedes #5035, which fixed only Dialog/AlertDialog.