- Issue created by @ckrina
- First commit to issue fork.
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 7:58am 27 November 2023 - ๐ท๐ธSerbia finnsky
Maybe put this logic on sidebar level?
I personally not really like this:
if (prevOpened && prevOpened !== button) { Drupal.behaviors.navigationProcessToolbarMenuTriggers.toggleButtonState(prevOpened, false); }
We have this logic for popovers with CustomEvents:
https://git.drupalcode.org/project/navigation/-/blob/1.x/js/sidebar.js?r...I know that we search buttons twice. But this is payment for simple structure.
- Status changed to Needs work
about 1 year ago 1:14pm 27 November 2023 - ๐ช๐ธSpain ckrina Barcelona
I just tested it and found something that should also be addressed: when you leave a submenu by opening another one (either clicking when opened, or hovering parent when the sidebar is collapsed) it should be reset. Meaning that every time that you open a submenu it should be in its initial stated (unless itโs active).
- ๐ท๐บRussia kostyashupenko Omsk
I would add my remark regarding javascript in module - we have many javascript files with too splitted logic from my point of view. For example expanding/collapsing behavior - we have different classnames and data attributes for 1st level buttons and 2nd level buttons. But actually the main goal of these buttons is just to expand/collapse, so these elements should be unified in this term and expanding behavior should be written in one drupal behavior (which controls all these buttons no matter on which levels they are).
I let @finnsky or other guys to complete this issue
- Status changed to Needs review
about 1 year ago 4:06pm 29 November 2023 - Status changed to Needs work
about 1 year ago 8:01am 30 November 2023 - ๐ท๐บRussia kostyashupenko Omsk
#7 ๐ One menu opening should close the others Needs review not fixed.
When you expanding new menu, all child els should be collapsed by default unless it's an active element (but not sure if we have to check if element is active or not). I'm thinking that by element is already active and all its tree is expanded. Means if user decided to collapse parent menu -> child should be collapsed aswell no matter if it's active element or not.
- ๐ฎ๐ณIndia prashant.c Dharamshala
It is concurred with #12 ๐ One menu opening should close the others Needs review that in instances where the parent menu undergoes a collapse, the associated child menu items should likewise undergo a collapse, specifically if they are not currently in an active state.
- Status changed to Needs review
about 1 year ago 10:26am 9 December 2023 - ๐ท๐ธSerbia finnsky
So!
In my point of view Component (Popover, Menu, Tooltip) only should control own state.
And all common logic will stay on sidebar.js level.
All communication between Navigation Components happens in one place via Custom Events bubbles.Please review!
- Status changed to RTBC
about 1 year ago 7:11pm 11 December 2023 - ๐ช๐ธSpain ckrina Barcelona
The code looks good to me, and I've manually tested and works great. Thanks all!
- Merge request !151Close all when one opened 3402899 2 - #3402899 โ (Merged) created by kostyashupenko
- ๐ฎ๐ณIndia prashant.c Dharamshala
Looks good to me. Working as expected for Parent menus. I am assuming we will not collapse child menus when other one is expanded for example under "Configuration" menu.
- ๐ท๐บRussia kostyashupenko Omsk
kostyashupenko โ changed the visibility of the branch close-all-when-one-opened-3402899 to hidden.
- ๐ท๐บRussia kostyashupenko Omsk
kostyashupenko โ changed the visibility of the branch 3402899-one-menu-opening to hidden.
- Status changed to Needs review
about 1 year ago 12:34pm 14 December 2023 - ๐ท๐บRussia kostyashupenko Omsk
The fastest option was to create new MR instead of doing hard rebases.
MR 151 opened, and i moved manually all the changes from the previous MR 141. Previous MR worked perfectly and i wanted to merge it and change status to "Fixed", but since hard rebase / recreation of the new MR -> this issue needs review again - ๐ฎ๐ณIndia prashant.c Dharamshala
I examined it in the live preview, and it functioned correctly.
-
ckrina โ
committed c3127b4f on 1.x authored by
kostyashupenko โ
Close all when one opened 3402899 2 - #3402899
-
ckrina โ
committed c3127b4f on 1.x authored by
kostyashupenko โ
- Status changed to Fixed
about 1 year ago 12:23pm 20 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.