MudDialog: Improve max height and alignment of dialog container on mobile#9457
MudDialog: Improve max height and alignment of dialog container on mobile#9457henon merged 1 commit intoMudBlazor:devfrom
Conversation
… correct alignment
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9457 +/- ##
==========================================
+ Coverage 89.82% 90.55% +0.72%
==========================================
Files 412 405 -7
Lines 11878 12713 +835
Branches 2364 2462 +98
==========================================
+ Hits 10670 11512 +842
+ Misses 681 639 -42
- Partials 527 562 +35 ☔ View full report in Codecov by Sentry. |
|
@epithet Do you have any thoughts on this? |
@danielchalmers I haven't looked at this in detail, but Here's an example of the kind of problem this solves: https://cloudfour.com/thinks/a-bashful-button-worth-8-million/ |
danielchalmers
left a comment
There was a problem hiding this comment.
Nice improvement! I think this is the only place we use vh, excluding the docs.
|
Thanks! Very noticable website content in your screenshots =P |
Description
Change the position of the
.mud-dialog-containerto be aligned to the left side of the nearest ancestor which has position relative. The dialog container can be at the containers start position, which does not take margin into consideration, left: 0; will attach it explicitly to the most left part.Change the
max-heightproperty of the.mud-dialogto be responsive regarding mobile phone adress/navigation bars.100vhdoes not take them into consideration, butdvh(smallest viewport height) will respect these. this is an additional feature tovh, so it will not break things.How Has This Been Tested?
<DialogContent>in theMudBlazor/src/MudBlazor.Docs/Pages/Components/Dialog/Examples/DialogUsageExample_Dialog.razorfile, which is the first example in the dialog page.To access this on your smartphone/iphone, change launchsettings>profiles>https>applicationUrl to
https://0.0.0.0:6666, then just access your pc/mac from your phone using 192.168.x.x:6666 (disable any vpn!)Type of Changes
Dialog container position:



Position is at the left of the
<main>which has auto margin left & rightNot noticeable when the
<main>is full widthDialog container now explicitly attached to the left using
left: 0;Here is what i mean with

vh&dvh:Checklist
dev).