{{ message }}
Repository navigation
[Component Audit] DialogHeader: preserve renderable slot content - #7454
Merged
cixzhang merged 1 commit intoOct 13, 2026
Merged
Conversation
|
AI review status for this pull request.
|
cixzhang
force-pushed
the
night-watch-component-audit/DialogHeader/2026-10-13
branch
from
October 13, 2026 10:56
4039d35 to
aa5bba1
Compare
Contributor
cixzhang
deleted the
night-watch-component-audit/DialogHeader/2026-10-13
branch
October 13, 2026 11:15
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

User impact
People can pass any
ReactNodetoDialogHeader'sstartContentandendContentslots, but the valid node0did not obey either slot contract. Start content appeared as a bare flex item outside its wrapper and theme target; end content disappeared when no close button rendered.Problem and solution fit
Both slot wrappers used JavaScript truthiness to decide whether content existed. React renders numeric zero, so the start guard leaked it as a bare child while the end guard dropped it when no close action created the wrapper. The fix uses the shared React-slot predicate already used across Astryx, consistently for subtitle and both content slots.
Expected behavior and authority
module:Dialog/DialogHeaderFR9 requires the leading wrapper whenever optional start content renders.module:Dialog/DialogHeaderFR10 requires the trailing wrapper whenever optional end content renders.Global review routing used triggers
public-api,behavioragainst base0675971ec1db8b53241bf7de4dcf7491ef463ea6and headaa5bba123ac739c694cfbfe7c3f6b1e5dd3624ed. None of the routed global claims governs React content-slot presence; direct module FR9 and FR10 settle this delta.Smallest restoration
isRenderablepredicate for subtitle, start content, and end content.null,undefined, booleans, and empty strings while allowing numeric zero.Evidence
0.isRenderablewith a nullish check makes the empty-scalar matrix fail.Component audit score
hasDividerdefault in consumer docs remains a non-blocking FIX instead of expanding this PR.Scope
Testing
pnpm vitest run packages/core/src/Dialog/Dialog.test.tsx packages/core/src/Dialog/DialogHeader.test.tsx packages/core/src/Dialog/useImperativeDialog.test.tsx packages/core/src/Dialog/__tests__/Dialog.a11y.test.tsx packages/core/src/theme/themingTargets.test.tscd packages/core && pnpm typecheckpnpm buildpnpm storybook:buildpnpm lint:strictpnpm check:knowledgepnpm check:changesetspnpm check:syncThere is no visual delta. Exact-head accessibility, RTL, and visual regression workflows remain required before merge.