Skip to content

Conversation

@versile2
Copy link
Contributor

Resolves #11675
Re-introduce the automatic max-height adjustments to just mud-lists as it was originally intended.
Restricted max-height to 3x overflowPadding (defaults to 24px)

Checklist:

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

@versile2 versile2 requested a review from Copilot July 18, 2025 18:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses issue #11675 by restricting the automatic max-height adjustments in MudPopover to only apply to mud-lists, as originally intended. The changes ensure that max-height adjustments are limited to a minimum of 3x overflowPadding (72px by default) and only occur for list elements.

  • Restricts max-height adjustments to only apply when the popover contains a mud-list element
  • Introduces a minimum max-height constraint of 3x overflowPadding (72px default)
  • Adds debugging console output to track first child elements

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@versile2 versile2 requested a review from danielchalmers July 18, 2025 18:47
@danielchalmers
Copy link
Member

What is the significance of 3x? Does it matter if the user has defined an item size that isn't 24px?

Is it possible we should use generic class names instead of mud-appbar, mud-list, mud-tooltip-root, etc, to be more extensible by others?

@versile2
Copy link
Contributor Author

What is the significance of 3x? Does it matter if the user has defined an item size that isn't 24px?

Is it possible we should use generic class names instead of mud-appbar, mud-list, mud-tooltip-root, etc, to be more extensible by others?

It was only ever made to be possible to shrink really long lists to the page and was originally set to mud-list. When I refactored it I was improving it and forget to re-enable it. As far as does size matter - no, it just looks dumb when it shrinks less than the size of an item and I wanted to make it more dynamic without complexity so I used overflowPadding that is passed from PopoverOptions.

@Welchen
Copy link
Contributor

Welchen commented Jul 28, 2025

Just upgraded to 8.10 and this is now causing some of my MudMenus to shrink. How do I go back to having no max height instead of the default 72?

@versile2
Copy link
Contributor Author

versile2 commented Jul 28, 2025

Just upgraded to 8.10 and this is now causing some of my MudMenus to shrink. How do I go back to having no max height instead of the default 72?

Do you have a trymud example? Make an issue? It shouldn't shrink unless it's going to exceed the height even after flipping. If you do not want that behavior at all just setting a max-height style on the list or popover of any value it will be ignored. If that's not the case make sure you have cache busting enabled to get the latest updates and post an issue.

@Welchen
Copy link
Contributor

Welchen commented Jul 28, 2025

It shouldn't shrink unless it's going to exceed the height even after flipping.

What height is in reference here? Height of the page?

I do have a trymud now, just didn't make any issue because I am not sure if bug or I just don't understand the change.

https://try.mudblazor.com/snippet/wOwfEhcCpryzKeJA

@versile2
Copy link
Contributor Author

It shouldn't shrink unless it's going to exceed the height even after flipping.

What height is in reference here? Height of the page?

I do have a trymud now, just didn't make any issue because I am not sure if bug or I just don't understand the change.

https://try.mudblazor.com/snippet/wOwfEhcCpryzKeJA

I will look into it, still think you should make an issue and tag me. For an immediate workaround set MaxHeight="1000" on your menu.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudTooltip - Incorrect appearance when Placement is set to Left or Right

3 participants