-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input: Don't add margin-top when input has no Label #8540
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8540 +/- ##
==========================================
+ Coverage 89.28% 89.54% +0.25%
==========================================
Files 411 411
Lines 11903 11836 -67
Branches 2357 2349 -8
==========================================
- Hits 10628 10598 -30
+ Misses 752 716 -36
+ Partials 523 522 -1 ☔ View full report in Codecov by Sentry. |
Nice one! Looks great from the light testing in my app. cc @henon |
For completeness, can you post a before picture that shows the same MudStack with misaligned text fields? |
src/MudBlazor.UnitTests.Viewer/TestComponents/General/AllInputsTest.razor
Outdated
Show resolved
Hide resolved
I have another question. When you have textfields with labels, textfields without labels and buttons they will still all align well? |
Ok, I think the solution we have now is the most reasonable of all the options. Thanks @ralvarezing |
Added to v7.0.0 Migration Guide #8447 |
@ralvarezing I think this broke MudAutocomplete visually. Could you check on your end? v7: v6: |
Oooh yeah I think I know what happened... i'll breake it down Almost all the inputs use the MudInput to implement the "field" itself, this MudInput is the one that implements the margins. And has to be set in all the inputs that uses this MudInput... So preatty sure I missed some (like the AutoComplete). I'll see to get that fixed and before opening a new PR, double check that I don't miss any other |
That should do it, Of corse, let me know if there is any other |
This issue still exists in 7.0.0-preview3 with MudTextField |
Sorry, can you provide some example in a playground or where do you have this issue. |
@ralvarezing Noticed this in the switches in this DataGrid examples: https://dev.mudblazor.com/components/datagrid#visual-styling Before: https://mudblazor.com/components/datagrid#editing Do you think it's related to this PR? |
Thxs for the example. I haven't had much time, but taking a look, yes this is the cause of this, specifically the removal of the margin-inline-end. I've created this small pr (literally 2 chars :D) so this gets fixed fast: #9102 |
Thanks @ralvarezing, glad it's an easy fix. I would love if you could look at #9009! Got semi approval here #8988 (comment) |
Description
When a Label is not set, a margin-top is not set. This fixes that inputs with no label won't align with other items.
This removes the margin-top from input text variants, but instead incorporates a new class (mud-input-{variant}-with-label), that adds margin top only if the input has a Label set.
fixes #8262
Before this change:
How Has This Been Tested?
Added a Viewer test to have all inputs affected by this fix in one place
Types of changes
Checklist:
dev
).