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

Fix: Side menu always displays #3064

Merged
merged 9 commits into from
Jul 29, 2024

Conversation

binarygit
Copy link
Contributor

Description

This PR ensures that the correct cookie is set after a user toggles the sidebar

Fixes #3059

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

2024-07-29.14-10-08.mp4

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

Copy link

codeclimate bot commented Jul 29, 2024

Code Climate has analyzed commit 9d6c238 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Collaborator

@adrianthedev adrianthedev left a comment

Choose a reason for hiding this comment

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

Can we make it so on initial load (so no cookie was set) it's not visible?
Try it in incognito to see what I mean.

@binarygit binarygit requested a review from adrianthedev July 29, 2024 10:31
Copy link
Collaborator

@adrianthedev adrianthedev left a comment

Choose a reason for hiding this comment

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

The previous issue is fixed, but it does not behave correctly.
It's still open on subsequent navigation.

CleanShot.2024-07-29.at.13.50.30.mp4

@binarygit binarygit requested a review from adrianthedev July 29, 2024 11:46
@binarygit
Copy link
Contributor Author

@adrianthedev
Could you look at my latest commit?

I preserved the old behaviour:

2024-07-29.20-18-24.mp4

However, when the page loads and the user hasn't toggled the sidebar yet, the sidebar "pops" open rather than "sliding out" because the js executes a little later than the css and the user can't see the transition. After this subsequent toggles do show the transition.

I'm not sure how to keep the sidebar hidden on mobile at first render and then also have it show the transition.

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Jul 29, 2024

However, when the page loads and the user hasn't toggled the sidebar yet, the sidebar "pops" open rather than "sliding out" because the js executes a little later than the css and the user can't see the transition.

The CSS transitions are never getting executed.

The JS removes then adds sidebar-open very quickly and the browser doesn't have time to apply the transitions.

Let's force a reflow on it.

@Paul-Bob Paul-Bob merged commit f6f4da0 into avo-hq:main Jul 29, 2024
21 of 22 checks passed
@Paul-Bob Paul-Bob added the Fix label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Side menu always displays
3 participants