[core] fix dialog layout regressions, use DialogBody more #5852
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.
Changes proposed in this pull request:
This fixes some layout regressions that were introduced with #5753.
Fix 1:
First, I've brought back the dialog body margin on
<div className={Classes.DIALOG_BODY}>
elements. We need this style to preserve backcompat of our CSS API:However,
<DialogBody>
can continue to use the (better) padding style instead of margin. This is ok because it's a new component introduced in core v4.14.0. This means that overflow scrolling still looks good:Fix 2:
The new MultistepDialog styles broke when there was no left section / no close button. This was due to the removal of a container element in the footer refactor in #5753. I've brought back that container element even in the case where there is no close button, and also renamed it to "main-section" instead of "left-section".
Internal enhancement:
I've migrated the rest of this monorepo to use
<DialogBody>
more consistently so that we can better dogfood it and prevent regressions like this.