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

[58454] Sidebar menu should be hidden when page width is reduced #17003

Merged

Conversation

bsatarnejad
Copy link
Contributor

Ticket

https://community.openproject.org/wp/58454

What are you trying to accomplish?

While resizing the window, if the window size is small, hide the menu like when we reload the page.

Screenshots

Before:
https://github.com/user-attachments/assets/7fae43a9-0505-4f8d-9ef5-bff49760d4f3

After:
https://github.com/user-attachments/assets/7da06ace-4a34-4592-9364-195f07d2f184

What approach did you choose and why?

Hide the side menu while resizing if the window size is smaller than 1012px.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from d423245 to 6a074fe Compare October 23, 2024 05:39
@bsatarnejad bsatarnejad changed the base branch from release/14.6 to dev October 23, 2024 05:40
@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from fb183c8 to 8005f9e Compare October 28, 2024 15:34
@bsatarnejad bsatarnejad self-assigned this Oct 28, 2024
@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from 8005f9e to b7657c3 Compare October 28, 2024 16:04
@bsatarnejad bsatarnejad requested a review from a team October 28, 2024 16:06
@dombesz dombesz requested review from dombesz and removed request for a team October 29, 2024 12:49
@dombesz
Copy link
Contributor

dombesz commented Oct 29, 2024

Hi @bsatarnejad

I have one remark, the sidemenu is not showing up after the browser width was reduced and then increased. I believe the sidemenu should show up according to the specification.

When the browser page is reduced and the sidebar menu is hidden (after a reload for instance), it should be shown again when the browser page is widened (like when reloading, but without having to reload)

sidebar not showing again

@bsatarnejad
Copy link
Contributor Author

bsatarnejad commented Oct 29, 2024

Hi @bsatarnejad

I have one remark, the sidemenu is not showing up after the browser width was reduced and then increased. I believe the sidemenu should show up according to the specification.

When the browser page is reduced and the sidebar menu is hidden (after a reload for instance), it should be shown again when the browser page is widened (like when reloading, but without having to reload)

sidebar not showing again sidebar not showing again

Hi @dombesz thanks, It's good point to fix this issue too. 👍
Could you please review the PR again? @dombesz

@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from aabfedd to b210c30 Compare October 30, 2024 05:43
@bsatarnejad bsatarnejad requested review from dombesz and removed request for dombesz October 30, 2024 09:53
Copy link
Contributor

@dombesz dombesz left a comment

Choose a reason for hiding this comment

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

Thanks @bsatarnejad , the resizing now works correctly. However, if the sidebar is hidden, it will still reappear after a refresh of the page.
hidden sidebar reappears

@bsatarnejad
Copy link
Contributor Author

Thanks @bsatarnejad , the resizing now works correctly. However, if the sidebar is hidden, it will still reappear after a refresh of the page. hidden sidebar reappears hidden sidebar reappears

Thank you for sharing your feedback! The behavior you're seeing is actually the default for the sidebar menu, so this particular fix doesn't address the issue you've pointed out.

@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from 9938a46 to c36f13c Compare November 4, 2024 13:53
@bsatarnejad bsatarnejad requested a review from dombesz November 5, 2024 07:46
@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from b567586 to 035d90c Compare November 12, 2024 08:29
@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch 3 times, most recently from f8d7e5e to f056f69 Compare November 17, 2024 12:10
@bsatarnejad bsatarnejad force-pushed the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch from f056f69 to 7de4100 Compare December 3, 2024 10:11
Copy link
Contributor

@dombesz dombesz left a comment

Choose a reason for hiding this comment

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

Thanks @bsatarnejad , LGTM! 👍

@bsatarnejad bsatarnejad merged commit 48a2f39 into dev Dec 11, 2024
10 of 11 checks passed
@bsatarnejad bsatarnejad deleted the 58454-sidebar-menu-should-be-hidden-when-page-width-is-reduced branch December 11, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants