Fix header navigation item allocation on resize#1228
Conversation
27ed7e5 to
6cda5ed
Compare
|
This all looks good to me, some nice tidy up within the JS for this component too. Take it this PR also ticks off updating the mocked navigation HTML used in the component test to actually represent the markup now being used as well? |
MatMoore
left a comment
There was a problem hiding this comment.
I skipped over some of the CSS details, but the javascript changes look good to me. Extracting methods for showing/hiding the menu bar is a nice improvement 👍🏻
Have a couple of minor suggestions inline, but the approach seems good.
@paulrobertlloyd Yeah it's the same HTML now, did I see that somewhere? I'd like to import Nunjucks in future and render the actual template so it's always correct 😮 |
|
Thanks @paulrobertlloyd @MatMoore I've pushed up some feedback, ready for review again |
a4178b4 to
aca84ed
Compare
Hey @anandamaryon1 thanks for spotting another bug 😆 The loop in if (item.element.parentElement === this.mobileMenu) {
return
}Which means:
But uniquely at 769px we adjust the spacing, so if we hadn't skipped we'd realise there was enough room I've pushed up a fix Other bug fixes and removalsI've also spotted a few other things so pushed:
With the tests updated to check the expected item counts at each width |
aca84ed to
3f37671
Compare
3f37671 to
926cf10
Compare
Co-authored-by: Colin Rotherham <work@colinr.com>
This prevents items appearing next to each other in browsers that do not support column-gap on flex containers and removes the need to use gap when calculating breakpoint widths in component JS. Co-authored-by: Colin Rotherham <work@colinr.com>
0d5e262
926cf10 to
0d5e262
Compare
304c2a8 to
535c3dd
Compare


Description
This PR fixes #1226 and adds 2x commits from #1058 as follows:
Most helpful was 2) where CSS
gapis removedChecklist