Skip to content

MudMenu: Hide popover overflow#11444

Merged
ScarletKuro merged 3 commits intoMudBlazor:devfrom
danielchalmers:menu-popover-overflow
Jun 3, 2025
Merged

MudMenu: Hide popover overflow#11444
ScarletKuro merged 3 commits intoMudBlazor:devfrom
danielchalmers:menu-popover-overflow

Conversation

@danielchalmers
Copy link
Member

Description

Narrower version of #9993. Only affects the Menu (if it's a direct descendant for max compatibility against custom implementations) instead of all popovers indiscriminately. Does not apply to regular lists, only menu lists.

Snippet and images still apply.

How Has This Been Tested?

visually

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)

image

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 the bug Unexpected behavior or functionality not working as intended label Jun 3, 2025
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 narrows the overflow hiding behavior to menu popovers only by applying an overflow: hidden rule to .mud-popover elements that directly contain a .mud-menu-list, preventing hover effects from peeking through when the popover is rounded.

  • Narrow overflow hiding to only affect menu popovers.
  • Prevent unintended hover effects leaking from menu items.
Comments suppressed due to low confidence (1)

src/MudBlazor/Styles/components/_menu.scss:94

  • [nitpick] Consider confirming that the use of the :has pseudo-class meets your browser support requirements, as it may not be supported in some older browser versions.
.mud-popover:has(> .mud-menu-list) {

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 3, 2025

@codecov
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.13%. Comparing base (5509f51) to head (0934389).
Report is 3 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #11444   +/-   ##
=======================================
  Coverage   91.13%   91.13%           
=======================================
  Files         465      466    +1     
  Lines       14412    14417    +5     
  Branches     2790     2792    +2     
=======================================
+ Hits        13134    13139    +5     
  Misses        641      641           
  Partials      637      637           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@versile2
Copy link
Contributor

versile2 commented Jun 3, 2025

part of mudPopover.js actually set's a max height to allow popovers that extend beyond and can't flip the available space to have a scrollbar (set max-height), this would just clip it instead of allowing a scrollbar, is that the intent?

@danielchalmers
Copy link
Member Author

part of mudPopover.js actually set's a max height to allow popovers that extend beyond and can't flip the available space to have a scrollbar (set max-height), this would just clip it instead of allowing a scrollbar, is that the intent?

I wasn't able to reproduce that, could you show me an example?

image

@versile2
Copy link
Contributor

versile2 commented Jun 3, 2025

Actually no, I changed it to set the max-height on the popover itself not the list so this wouldn't affect that. It does check if the list has a max-height and I am under the impression that people are using overflow for scrollbars when max-height is set so this might affect them but my code doesn't I was mistaken.

Copy link
Member

@ScarletKuro ScarletKuro left a comment

Choose a reason for hiding this comment

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

Hope this doesn't cause problems like last time.

@ScarletKuro ScarletKuro merged commit 743c547 into MudBlazor:dev Jun 3, 2025
6 checks passed
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.

4 participants