Skip to content

MudTooltip: Remove width:fit-content#10720

Merged
danielchalmers merged 2 commits intoMudBlazor:devfrom
Anu6is:1167-MudTooltip-Width
Jan 27, 2025
Merged

MudTooltip: Remove width:fit-content#10720
danielchalmers merged 2 commits intoMudBlazor:devfrom
Anu6is:1167-MudTooltip-Width

Conversation

@Anu6is
Copy link
Contributor

@Anu6is Anu6is commented Jan 26, 2025

Description

Setting width: fit-content on mud-tooltip-root prevented the Inline toggle from working as expected.

This removes the unnecessary width definition. I've added visual test cases for all the reported odd tooltip wrapping behavior that I could find. With fit-content removed, most can be solved by setting Inline="false" while a few resolved naturally with just the removal of fit-content. There were two cases where RootClass="mud-width-full" was required (i.e. wrapping the Tooltip in a MudStack or a MudTd)

Question:

Should we add a FullWidth option to the MudTooltip to facilitate the cases where RootClass="mud-width-full" may be needed?

How Has This Been Tested?

Visually - Test view and Docs

Fixes: #1167
Fixes: #3844 (closed incorrectly)

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)

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 Jan 26, 2025
@codecov
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.83%. Comparing base (6962133) to head (b1ccd7b).
Report is 3 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10720   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files         427      427           
  Lines       13425    13425           
  Branches     2589     2589           
=======================================
  Hits        12329    12329           
  Misses        523      523           
  Partials      573      573           

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

@sonarqubecloud
Copy link

@ScarletKuro ScarletKuro linked an issue Jan 26, 2025 that may be closed by this pull request
@danielchalmers
Copy link
Member

We should avoid new properties and make it work out of the box if possible (FullWidth)

FYI it was added in #3030. Any ideas why @Garderoben ?

@Anu6is
Copy link
Contributor Author

Anu6is commented Jan 27, 2025

We should avoid new properties and make it work out of the box if possible (FullWidth)

I don't think that's possible. there may be varying scenarios that come into play at it would be difficult to assume if the user want full width or not.

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.

@Garderoben isn't sure of the original reason it was included so we agree on changing it then seeing if any regressions are found later

@danielchalmers danielchalmers merged commit c4cb9af into MudBlazor:dev Jan 27, 2025
6 checks passed
@danielchalmers
Copy link
Member

Maybe we take some inspiration from MD3, plain vs rich tooltips: https://m3.material.io/components/tooltips/overview

@Anu6is Anu6is deleted the 1167-MudTooltip-Width branch January 27, 2025 20:49
@Anu6is Anu6is mentioned this pull request Jan 31, 2025
4 tasks
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.

MudToolTip is not flex compatible MudTooltip with MudList - unexpected results

3 participants