- Issue created by @prashant.c
- 🇪🇸Spain ckrina Barcelona
I can reproduce this bug: it only happens with 1st menu items that don't have children, like People or Appearance. Thanks @Prashant.c!
- 🇮🇳India pragati_kanade Pune
Hi @Prashant.c I'm not able to reproduce this issue.My screen resolution is 1920X1080. I have also tried to reproduce on 1366X768,1440X900,1280,700.
Please guide me further to produce this issue so that I can fix this.
Thanks - 🇪🇸Spain ckrina Barcelona
Yes, I still can reproduce this. I've added step by step instructions on the issue summary.
- First commit to issue fork.
- Assigned to JatinGupta40
- Status changed to Needs review
10 months ago 7:04am 20 February 2024 - Assigned to dishakatariya
- Issue was unassigned.
- Status changed to RTBC
10 months ago 8:13am 20 February 2024 - 🇮🇳India dishakatariya
Hi, Verified and tested Merge request !177 on the Drupal 11.x version. Patch applied successfully and working fine.
Testing steps:
1. Install the Drupal 11.x version
2. Install the navigation module
3. Reduce the browser height to a size where the Configuration menu is shown, and the People is hidden below the navigation footer.
4. Navigate to admin/content
5. Click on Configuration
6. The sub-menu children of Configuration will open below the footer, when it should actually scroll the show the sub-menu.
7. You can see the correct behavior by:
8. Navigate to /admin/structure/block
9. Resize the browser to a height that hides People
10. Click on Configuration: it will scroll to fit the sub-menu
Testing Results
When the parent menu is expanded, the navigation bar should be automatically scrolling to ensure visibility of the child menus.
Attaching the recording below.
Can be move to RTBC.
RTBC++ - Status changed to Needs work
10 months ago 9:17am 20 February 2024 - 🇪🇸Spain ckrina Barcelona
Thanks all for your work here! After testing this I've found an usability problem this is introducing: if it scrolls too much to fit as much of the item on the screen the 1st menu item label is lost. This label is what actually gives you the context to know which menu item you're in, and if it gets moved beyond the visible area that context is lost.
The ideal behavior would be to place the whole submenu on the visual space, but always ensuring the label of the parent menu item being opened is visible. That could be done in several ways, like calculating its height in the current implementation or rethinking if the current approach of showing "the nearest" item is the best one.
- Assigned to JatinGupta40
- 🇮🇳India JatinGupta40
Thank you for noticing this issue @ckrina. I will work on it and update the code.
- Issue was unassigned.
- Status changed to Needs review
10 months ago 7:47am 23 February 2024 - Status changed to RTBC
10 months ago 1:58pm 23 February 2024 - 🇮🇳India dishakatariya
HI Verified and tested as per #11 comment and Merge request !177. It looks fine to me now.
1st item label is coming properly now and fit to the screen.
attached the recording below.
Hence moving this to RTBC
RTBC++ - Status changed to Needs work
10 months ago 4:02pm 23 February 2024 - 🇨🇦Canada m4olivei Grimsby, ON
Found some issues from a code and functionality perspective. I'm seeing a "snap-back" behavior sometimes due to the callback thats meant to fix the top position:
- Assigned to JatinGupta40
- 🇮🇳India JatinGupta40
Thank @m4olivei for the suggestions you have provided. Will definitely work on it.
- Issue was unassigned.
- Status changed to Needs review
10 months ago 10:14am 26 February 2024 - 🇮🇳India JatinGupta40
Hello @m4olivei I have made the changes regarding the suggestion you provided. Can you please again have a look at it? Thanks
- 🇮🇳India Kanchan Bhogade
Hi
I've tested Merge request !177 on Drupal 11.x for standard and Umami
The patch was applied successfully...
It looks fine to me now.RTBC+1
attaching videosKeeping in "needs review" for code verification
- 🇮🇳India dishakatariya
Hi Verified and tested the Merge request !177 on the Drupal 11.x for standard and Umami. This is working as expected now.
Attaching the recording below.
RTBC+1
Keeping it in review as per above comment to review the code. - Status changed to Needs work
10 months ago 3:58pm 28 February 2024 - 🇨🇦Canada m4olivei Grimsby, ON
Thanks for the continued work on this! Code is looking better. While testing this time around, I noticed that we have the same reported issue at the second level of links as well. It would be good to handle that here too, eg.
https://www.drupal.org/files/issues/2024-02-28/level_2_issue.mp4 →
Also, I don't think that we want the auto-scroll behavior at all when the menu is collapsed. The sub-links in this case appear in a pop-over which is visible, so there is no need to scroll the navigation container. When you do that, it feels unexpected and at desktop, you loose hover over the parent item, which closes the popover.
https://www.drupal.org/files/issues/2024-02-28/collapsed_scroll.mp4 →
- Assigned to JatinGupta40
- 🇮🇳India JatinGupta40
Sure @m4olivei. Appreciate your suggestion, Will work on that.
- 🇷🇸Serbia finnsky
Thank you for work!
Added one comment.Large part of that Navigation JS works with custom events.
https://developer.mozilla.org/en-US/docs/Web/API/CustomEventSo all of things already defined. you only need to catch this event like it happends here
https://git.drupalcode.org/project/navigation/-/blob/1.x/js/sidebar.js#L...
- Issue was unassigned.
- Status changed to Needs review
10 months ago 1:35pm 4 March 2024 - 🇮🇳India JatinGupta40
Thank you for the review and for providing the suggestions.
I have made the suggested changes. Please review. @finnsky @m4olivei - Status changed to Needs work
10 months ago 6:49pm 7 March 2024 - 🇨🇦Canada m4olivei Grimsby, ON
@JatinGupta40 the latest updates are not taking advantage of the custom event that @finnsky referenced in #23. That is still to do, and can potentially simplify the code here. Have you looked at that?
Also, still seeing some odd behavior when collapsed. If I expand a child menu item to reveal the grandchildren, the navigation scrolls, which is odd.
https://www.drupal.org/files/issues/2024-03-07/collapsed_scroll_grandchi... →
- Status changed to Closed: outdated
9 months ago 3:12pm 5 April 2024 - 🇺🇸United States KeyboardCowboy Denver, CO, USA
Thanks for all the work on this! Since we switched to the Drawer designs, though, this is no longer applicable so we're going to close this now.