Skip to content

[all components] Correct inaccurate prop JSDoc - #5036

Merged
atomiks merged 3 commits into
mui:masterfrom
atomiks:all-components/fix-prop-jsdoc
Jun 15, 2026
Merged

atomiks merged 3 commits into
mui:masterfrom
atomiks:all-components/fix-prop-jsdoc

Conversation

@atomiks

@atomiks atomiks commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

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 that unmount() 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.
  • Trigger state (Dialog, Drawer, Popover, Menu, PreviewCard, Tooltip) — open is true only when the popup is open and was opened by that trigger (the state is derived from isOpenedByTrigger); disabled reflects the trigger, not the popup. Triggers whose open reflects the actual popup open state (Select, Combobox, Autocomplete, submenu, context menu, accordion/collapsible) were left unchanged.
  • Dialog.Popup / Popover.Popup initialFocus/finalFocus — document the null-fallback and the touch default (the popup itself is focused on touch to avoid opening the virtual keyboard).
  • Document createAlertDialogHandle.

Supersedes #5035, which fixed only Dialog/AlertDialog.

@atomiks atomiks added the scope: all components Widespread work has an impact on almost all components. label Jun 12, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@5036
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5036
    

commit: 5b186ec

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,171.96 ms -3.35 ms(-0.3%) | Renders: 50 (+0) | Paint: 1,775.62 ms +20.84 ms(+1.2%)

Test Duration Renders
Tooltip mount (300 contained roots) 58.21 ms 🔺+13.12 ms(+29.1%) 1 (+0)
Dialog mount (300 instances) 58.24 ms 🔺+12.01 ms(+26.0%) 1 (+0)

10 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 5b186ec
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a2f494bd2df1000096bc139
😎 Deploy Preview https://deploy-preview-5036--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks
atomiks force-pushed the all-components/fix-prop-jsdoc branch from 34207cd to 386bd19 Compare June 12, 2026 07:35
@atomiks
atomiks requested a review from Copilot June 12, 2026 08:04
@atomiks
atomiks marked this pull request as ready for review June 12, 2026 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 open reflects “open and opened by this trigger” (derived from isOpenedByTrigger) and disabled reflects the trigger.
  • Reword actionsRef unmount docs to describe manual unmounting after closing animations.
  • Fix/clarify disablePointerDismissal and initialFocus/finalFocus documentation; add documentation for createAlertDialogHandle.

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.

@atomiks
atomiks merged commit a47b1df into mui:master Jun 15, 2026
6 checks passed
@atomiks
atomiks deleted the all-components/fix-prop-jsdoc branch June 15, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: all components Widespread work has an impact on almost all components.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants