Closed epithet closed 1 week ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.09%. Comparing base (
28bc599
) to head (e511acb
). Report is 153 commits behind head on dev.:exclamation: Current head e511acb differs from pull request most recent head 2a527aa. Consider uploading reports for the commit 2a527aa to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Smart! Could you apply
display: contents
in the CSS files instead of in razor?
@danielchalmers sure, do you want it in _dialog.scss
as a solution specific to the dialog, or should I introduce a new scss
file for the focus trap, so that the focus trap never disturbs the layout?
@epithet I think it makes a lot of sense to apply it to all focus traps. In fact, do you think it should apply to the _root
div as well?
Could you confirm this all works on the MudMessageBox as is uses Dialog and has its own FocusTrap?
Thanks
@epithet Do you think display: contents
could fix #1167 by adding it to the MudTooltip?
@epithet I think it makes a lot of sense to apply it to all focus traps. In fact, do you think it should apply to the
_root
div as well?
@danielchalmers Yes, it has to be applied to both _root
and mud-focus-trap-child-container
. I originally applied it to _root
via inline style from MudDialog.razor
. Now, I apply it to both from CSS.
BTW, if someone really needs a different behavior, it can be overridden inline <MudFocusTrap Style="display: ...">
or with a more specific CSS selector such as .mycomponent > .mud-focus-trap { display: ... }
.
Could you confirm this all works on the MudMessageBox as is uses Dialog and has its own FocusTrap?
I can confirm and I updated the PR description accordingly.
@epithet Do you think
display: contents
could fix #1167 by adding it to the MudTooltip?
Possibly. I added a comment to the PR.
@danielchalmers The vertical padding was different when DisableSidePadding="true"
. While converting the vertical paddings to margins, I only refactored and thus kept the different spacings. But it seems to me that the property should not have any influence on the top/bottom paddings/margins. Can you confirm this is intentional?
The vertical padding was different when
DisableSidePadding="true"
. While converting the vertical paddings to margins, I only refactored and thus kept the different spacings. But it seems to me that the property should not have any influence on the top/bottom paddings/margins. Can you confirm this is intentional?
I asked and didn't get a response so I'd say just leave it as it now even if it's weird.
@danielchalmers Is there something else I can do?
@epithet Looks good, I think there are conflicts though
Conflicts need resolving. Is this breaking or not?
@danielchalmers @henon conflicts resolved
Is this breaking or not?
No, there are no API changes.
Thanks you!
Currently, when the content height exceeds the available height in a dialog, the whole dialog becomes scrollable, which means that the title and the action buttons can be scrolled out of sight. In the "Scrollable Dialog" example from the documentation, two scrollbars are rendered next to each other unnecessarily when the browser window becomes too small:
This PR makes the content area scrollable, which ensures that title and action buttons remain visible as long as possible.
Description
This simplifies both the implementation and the "Scrollable Dialog" example (even though the previous version of the example still works). The layout now essentially works like before the introduction of the focus trap, since the additional
div
s are ignored by the browser's layouting due todisplay: contents
.The top and bottom paddings of the content area have been made margins instead, so that the overflowing content is cut off at the right position when the content becomes scrollable.
The issues recently fixed by #8743 remain fixed.
How Has This Been Tested?
This has been tested with the
MudBlazor.Docs.Server
project and the following examples:Type of Changes
Checklist
dev
).