Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

versile2
Copy link
Contributor

@versile2 versile2 commented Nov 8, 2024

Description

Popover mud-list items create scrollbars in the main window when they exceed screen height. This can only happen if the flip function can't flip them without exceeding the top or left. (right in RTL) These changes add a max-height property if and ONLY if a mud-list in a popover would create a scrollbar outside of itself.

Resolves #10204

How Has This Been Tested?

Visual Tests Below

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.

…en height and is a mud-list. (mud-select or mud-menu). This enables overflow to work as intended.
@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Nov 8, 2024
@versile2
Copy link
Contributor Author

versile2 commented Nov 8, 2024

Scrollbar

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.

Nice! Could you add a bit of a gap at the end so it doesn't look like it's being clipped?

image

image

@versile2
Copy link
Contributor Author

versile2 commented Nov 9, 2024

Nice! Could you add a bit of a gap at the end so it doesn't look like it's being clipped?

image

image

Went with 8px, I think it looks good. let me know or is there a standard amount I should use?

Screenshot 2024-11-08 185422

@danielchalmers
Copy link
Member

Great! Maybe a little extra padding, 24px - Here's what google docs looks like:

image

Is it intended that the submenu doesn't grow upwards? All the items could fit on the page if it expanded

image

Copy link

sonarqubecloud bot commented Nov 9, 2024

@versile2
Copy link
Contributor Author

versile2 commented Nov 9, 2024

so the menu won't fit if it goes down from opening position.
The js sees the flip tag and tries to flip it, but it also won't fit flipped
Then the special js I added for all the other issues comes into play and that's where this js is.

Moving the sub-menu "up" seemed odd to me so I was happy when you posted the spec showing a scrollbar.

Here's 24px

image

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.

LGTM!

@danielchalmers danielchalmers requested a review from henon November 9, 2024 16:43
@henon henon changed the title Fix - Select / Menu Max Height exceeds window MudSelect, MudMenu: Fix max height exceeds window Nov 10, 2024
@henon henon merged commit a35edcb into MudBlazor:dev Nov 10, 2024
5 checks passed
@henon
Copy link
Collaborator

henon commented Nov 10, 2024

Thanks Versile Johnson II

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.

MudMenu content may goes out of window / expands window
4 participants