Component changelog
Dialog changelog
Component-specific release notes collected from the full changelog. This page filters the published entries that mention Dialog.
Release
v1.1.2
Patch Changes
- f70cd18Fix Dialog.Close and AlertDialog.Cancel types so they accept standard button props.
Release
v1.1.0
Patch Changes
-
5a38eef: docs(guides): add a troubleshooting guide for SSR, portals, and focus
New
docs/app/docs/guides/troubleshootingpage covering the integration failures that are otherwise spread across guides, organised as symptom / likely causes / what to try:- hydration mismatches on overlay and theme components
- portal containers rendering in the wrong place or missing theme tokens
- focus not restoring after a dialog, popover, or menu closes
- focus traps that are too narrow or too wide
- overlays flashing or never opening on first paint
- scroll lock leaking after an overlay unmounts
Registered in
docsNavigationSectionsand cross-linked from the existing SSR & No-JS Fallback guide.
Release
v1.0.0
Patch Changes
-
05c0ccb: Add
defaultOpentoDialog.Rootand fix controlled/uncontrolled handlingDialogPrimitive.Rootnow acceptsdefaultOpenfor uncontrolled usage and switches from hand-rolleduseState+useEffectsyncing to the existinguseControllableStatehook.This also fixes controlled mode. Previously
openwas seeded into local state and re-synced by an effect, so a controlled dialog still opened when the trigger was clicked even though the parent heldopen={false}— the effect only re-ran whenopenitself changed. WithuseControllableState, a definedopenis authoritative: the dialog reports the request throughonOpenChangeand waits for the parent to update.AlertDialoginherits the same fix. ItsonOpenChangetest asserted the old behaviour (clicking the trigger opened a controlled dialog) and now asserts correct controlled semantics: the request fires, the dialog stays closed until the parent rerenders withopen={true}. -
55d0806: fix(dialog): merge consumer props through getItemProps on Action and Cancel
DialogPrimitiveActionandDialogPrimitiveCancelspread consumer props after the props returned bygetItemProps, so a consumer handler replaced the library's own handler instead of running alongside it.On
Action, passing anonClicksilently suppressed the close: the internalhandleOpenChange(false)was overwritten, so the dialog stayed open.Both parts now pass consumer props into
getItemPropsand composeonClickexplicitly, so the consumer handler runs first and the dialog still closes:{...getItemProps({ ...props, onClick: (e) => { onClick?.(e); handleOpenChange(false); } })}DialogPrimitiveContextTypealso widensgetItemProps,getReferencePropsandgetFloatingPropsto accept optional user props, and the default context value returns those props unchanged instead of{}. -
ebcab1f: Expose Dialog trigger
data-state,data-disabled, andaria-expandedattributes from the primitive. -
1ec9c6d: fix(drawer): resolve peekStyle temporal dead zone in DrawerContent
DrawerContentreferencedpeekStyleinside thegetFloatingPropscall before the variable was declared further down the component body. Theconstdeclarations sat below an earlyreturn, so the reference landed in the temporal dead zone. The file failed to type-check, which broke four Drawer test suites at compile time.Hoisting the
peekOffset/peekStylepair above thegetFloatingPropscall fixes the ordering.getFloatingPropsis also cast to its user-props signature, matching the convention already used by Dialog, Combobox and Menu. -
0ccabb4: fix(scrollarea): hide the scrollbar while a document overlay is open
An overlay (Dialog, Menu, Popover, Combobox, Drawer) covers the page and locks body scroll, but a
ScrollAreawithtype="always"still painted its scrollbar and thumb on top of it.Adds a document-level overlay registry and suppresses the scrollbar and thumb while any overlay is open:
const isVisible = !overlaySuppressesScrollbar && (type === "always" || (type === "auto" && isOverflowing) || (isOverflowing && (type === "scroll" || type === "hover") && scrollbarVisible));The registry is ref-counted and mirrors its state onto
data-rad-ui-overlay-openon<html>, so overlays stack correctly (two open overlays decrement back to zero rather than clearing early).ScrollAreapicks the state up viauseDocumentOverlayOpenState, which also observes the attribute andbody's inlinestyle, so overlays from other libraries that only lock body scroll are covered too.resetDocumentOverlayOpenForTestsis wired into the globalafterEachinsetupTests.tsso the registry cannot leak between suites. -
6c18fcb: docs(a11y): add ARIA references for alert dialog, context menu, and menubar