-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(menu): make submenu scrollable #5082
Conversation
|
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Pull Request Test Coverage Report for Build 13306117485Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blunteshwar The structural element of this commit shouldn't be a chore rather this should be fix(menu) and it should surface up in the changelog for menu. Let me know if you have any questions. Please make sure you have a commit with fix(menu) for this.
Also can we attach the scrolling tests in Chrome, Firefox and Safari most importantly. |
…mponents into menu-item-overflow
@@ -73,6 +73,7 @@ governing permissions and limitations under the License. | |||
::slotted([slot='submenu']) { | |||
width: max-content; | |||
max-width: 100%; | |||
overflow-y: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is expected because in this particular example inside the menu item named Brooklyn
there is a div which contains the list of menu items. I did this using a div to replicate the example used by the bug reporter here.
Since the bug was for custom root submenu
so to replicate the same I used a div instead of a sp-menu
. Similar kind of padding is here as well(this is a screenshot from the storybook deployed from main branch) because here as well a div is being used instead of a sp-menu
Description
When a submenu inside a custom root menu contained multiple menu items, it was not scrollable, making some items inaccessible.
Fix
Added overflow-y: auto to ensure the submenu becomes scrollable when it has many menu items.
Related issue(s)
#4985
How has this been tested?
Test case 1
Did it pass in Desktop?
Did it pass in Mobile?
Did it pass in iPad?
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.