Skip to content
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

💄 [#1495] Make desktop navigation toggle #638

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

jiromaykin
Copy link
Contributor

@jiromaykin jiromaykin commented May 26, 2023

  • Click on the desktop menu to open, and click on the same menu to close
    (make it work for both main menu and authenticated menu)
    (while making Tab and Escape work)

Click outside desktop menu will also close it.

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2023

Codecov Report

Merging #638 (617fb8b) into develop (5f78ccb) will not change coverage.
The diff coverage is n/a.

❗ Current head 617fb8b differs from pull request most recent head a8a22a9. Consider uploading reports for the commit a8a22a9 to get more accurate results

@@           Coverage Diff            @@
##           develop     #638   +/-   ##
========================================
  Coverage    96.46%   96.46%           
========================================
  Files          612      612           
  Lines        21172    21172           
========================================
  Hits         20424    20424           
  Misses         748      748           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jiromaykin jiromaykin force-pushed the feature/1495-make-desktop-navigation-toggle branch 2 times, most recently from 617fb8b to b91ce82 Compare June 1, 2023 13:30
@jiromaykin jiromaykin force-pushed the feature/1495-make-desktop-navigation-toggle branch from aa67e32 to a8a22a9 Compare June 1, 2023 13:37
@jiromaykin jiromaykin requested review from vaszig and Bartvaderkin June 1, 2023 14:35
Copy link
Contributor

@Bartvaderkin Bartvaderkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve in general but added some notes on code style.

this.setState({ dismissed: false })
this.node.classList.add('primary-navigation--open')
toggleDesktopNavOpen() {
this.node.classList.toggle('primary-navigation--open')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is .toggle() what is intended in cases like this? Shouldn't it be .add()?

If we .toggle() there is an assumption being made about the state (eg: less robust).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bartvaderkin I'm afraid it really has to be a toggle and I can't really find any warnings about this anywhere - the 'state' isn't really a state here, but one day I might look back on this and think it should be done differently.

&:not(#{&}--dismissed) &__list-item:focus,
&:not(#{&}--dismissed) &__list-item:focus-within {

&:not(#{&}--dismissed)[class*='--open'] &__list-item {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, but selectors like &:not(#{&}--dismissed)[class*='--open'] have that little whiff that triggers the senses.

@jiromaykin jiromaykin marked this pull request as ready for review June 1, 2023 15:06
@alextreme alextreme merged commit 3401025 into develop Jun 1, 2023
@alextreme alextreme deleted the feature/1495-make-desktop-navigation-toggle branch June 1, 2023 18:29
@@ -263,12 +269,13 @@
&:focus,
&:focus-visible,
&:focus-within {
border: 2px solid orange;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jiromaykin misschien moeten we een 'orange' pre-commit githook voor je optuigen :P gefixed in develop aangezien ik er vanuit ga dat dit niet de bedoeling was

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alextreme dit element heeft een focus-kleur nodig voor toegankelijkheid, maar we hebben daar geen style voor; dus nieuw issue: standaard browser-focuskleur hier in terug brengen of een kleur zetten voor het hele project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jiromaykin Volgens mij hebben we al een focus-kleur, toch? Ik zie 'm in ieder geval wel als ik door de site heen tab. Prima als hiervoor ook op dit element iets wordt toegevoegd, maar dan graag net zoals bij de andere elementen.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants