Skip to content

Conversation

@charles7668
Copy link
Contributor

@charles7668 charles7668 commented Dec 4, 2024

Description

Close #6457
Close #9894

How Has This Been Tested?

Add a viewer page named OutlineLabelBackgroundTest

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

before
msedge_XTYDMWL862

after
msedge_OazDk0CHxW

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Dec 4, 2024
@codecov
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.50%. Comparing base (ff672a8) to head (ade6645).
Report is 25 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10385      +/-   ##
==========================================
+ Coverage   91.43%   91.50%   +0.06%     
==========================================
  Files         418      418              
  Lines       13226    13227       +1     
  Branches     2538     2540       +2     
==========================================
+ Hits        12093    12103      +10     
+ Misses        554      549       -5     
+ Partials      579      575       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@charles7668 charles7668 force-pushed the fix/fix-textfield-outline-label-background branch from 1b90c9c to 44255b7 Compare December 4, 2024 08:27
@danielchalmers
Copy link
Member

My concern is the lack of background contrast for Shrink Normal and Shrink Dense makes them hard to read.

Should probably keep the background color but take it from the field (or whatever's behind it)? I've tried to do that before though and don't have an answer.

@ScarletKuro ScarletKuro requested a review from henon December 5, 2024 16:31
@henon
Copy link
Contributor

henon commented Dec 6, 2024

I think this PR makes the label better than it was before.

Clearly before was bad:
image

And I consider this case as a simple "don't do that":
image

Also, it didn't look good before either:
image

So we have a net win.

@Garderoben Garderoben self-requested a review December 8, 2024 10:44
Copy link
Member

@Garderoben Garderoben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charles7668 i found one bug. When Shrink Label is used or when the TextFields have a value they are always marked as focused even when they are not?

Left one is your branch, right one current mudblazor.
image
image

@charles7668
Copy link
Contributor Author

@charles7668 i found one bug. When Shrink Label is used or when the TextFields have a value they are always marked as focused even when they are not?

Left one is your branch, right one current mudblazor. image image

Fixed

explorer_uojtMezd4D

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2024

@Garderoben
Copy link
Member

@charles7668 i found one bug. When Shrink Label is used or when the TextFields have a value they are always marked as focused even when they are not?
Left one is your branch, right one current mudblazor. image image

Fixed

explorer_uojtMezd4D explorer_uojtMezd4D

Awesome thanks! I'm just gonna double check with @danielchalmers before i merge.

@danielchalmers
Copy link
Member

I should be able to review on the weekend, thank you for the patience!

@danielchalmers
Copy link
Member

My concern that the contrast is not enough is worked around by picking appropriate colors from the start (the test page shows how important it is)

image

image

I believe MUI works the same way

image

LGTM

Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@danielchalmers danielchalmers merged commit acd34d1 into MudBlazor:dev Dec 14, 2024
6 checks passed
LLauter pushed a commit to cannellamedia/MudBlazor that referenced this pull request Dec 16, 2024
@timmac-qmc
Copy link
Contributor

Not sure if I've missed something but this change looks awful on 8.0.0-rc.2

The label has a clear line through it as the background is now set to transparent:

image

@henon
Copy link
Contributor

henon commented Jan 15, 2025

I wonder why it looks OK on our docs but not for you.
image

Can you reproduce this with try.mudblazor.com ?

@timmac-qmc
Copy link
Contributor

timmac-qmc commented Jan 15, 2025

I wonder why it looks OK on our docs but not for you. image

Can you reproduce this with try.mudblazor.com ?

Assume the docs aren't using the pre-release which has the change. If you check the css it looks like the latest commit for the style isn't being used

https://github.com/MudBlazor/MudBlazor/blob/77720255c6dd7e94ebe5dea848a2a450c64d3fc7/src/MudBlazor/Styles/components/_inputlabel.scss

@henon
Copy link
Contributor

henon commented Jan 15, 2025

You are right about the docs running a v7 version. But we also have dev.mudblazor.com which runs current development branch head and it seems ok there too:
https://dev.mudblazor.com/components/textfield#form-props-shrink-label

@timmac-qmc
Copy link
Contributor

timmac-qmc commented Jan 15, 2025

Found the cause, I had bootstrap.min.css included in my index.html in particular it was overwriting the <legend> properties
Removing it resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outlined MudTextField broken text background mud-input-label background color is difference with body background color in dark theme

5 participants