Some tasks to prepare for core MR, will probably complete this over time.
Must have
Done
In the JS all the element selectors should rely on data attributes and not class names, things such as.toolbar-menu__item.toolbar-menu__item--level-2etc.There are some syntax issues, ifs that are not wrapped with {}, multiple declarations of variables on one line. essentially the eslint core config should be run on the code and fixed.
I don't have a good solution for that yet, the code could use a refactor to improve readability possibly grouping the positioning into one file/area of the code that sort of things.
Comments
Comment #2
finnsky commentedRefactor suggestion here
https://www.drupal.org/project/navigation/issues/3401159
Comment #3
ckrinaWe just discussed this with @finnsky and it looks like everything on the summary has been addressed so far:
This has been done.
After componentizing the CSS and JS and breaking the JS in several files ("no monolithic js anymore" per @finnsky words) we think this is addressed too. The work happened in:
Maybe this would need another round to review what needs to happen for core, or otherwise we could close this one.
Comment #4
ckrinaComment #5
ckrinaAdding some JS related issues in the issue summary, on the Should have for now.
Comment #6
ckrinaPostponing this until we get #3412125: Convert jQuery to vanilla Javascript, so the code will be on a more finished state.
Also updating the issue summary.
Comment #7
nod_Been using the module for a few days, there is a perf issue. Font flashes on every page it's pretty annoying. The initialisation should be done outside of behaviors, that happens too late.
We did a lot of optimisation work on the core toolbar to avoid any flash or layout shift, we should do the same here before getting that in
Comment #8
ckrina@nod_ there is an issue for that™ :P #3423020: Flickering when loading the page. Adding it to the issue summary, thanks!.
Comment #9
ckrinaComment #10
ckrinaChanging title & status since it's active.
Comment #11
ckrinaClosing this now that #3438895: Add the new Navigation to core as an Experimental module has been opened and all the JS feedback is going to be addressed from there.
Comment #12
ckrina