Skip to content

Feature/collapsed UI menu #1243

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RismanRJ
Copy link

@RismanRJ RismanRJ commented Jul 16, 2025

Closes #1197

Description

  • Implemented a collapsible SideMenu with collapsed state using useState.
  • Replaced the mobile-only hamburger menu with a universal collapse/expand toggle using
    ChevronLeftIcon and ChevronRightIcon from @mui/icons-material.
  • When collapsed:
    • Only icons are shown in the menu.
    • Tooltips appear on hover for accessibility.
    • Compact logo (responsiveLogo) is displayed.
  • When expanded:
    • Both icons and labels are visible.
    • Full-size logo (logo) is shown.
  • Menu layout is responsive using useMediaQuery.

Purpose

Enhances the UX by allowing users to collapse the sidebar for more content space. Makes the layout responsive and consistent across screen sizes.

Solution

  • Introduced collapsed state in SideMenu.tsx.
  • Added a toggle button using:
    • <ChevronLeftIcon /> when expanded
    • <ChevronRightIcon /> when collapsed
  • Conditionally rendered logo, text, and tooltips based on collapsed and isMobile.
  • Updated makeStyles to adapt styles dynamically.
  • Ensured that only icons show on collapse with proper spacing and alignment.

Checklist

  • Code tested and functions as intended
  • Collapse/expand toggle works with Chevron icons
  • Tooltip shows in collapsed mode
  • Logo swaps correctly based on state
  • Responsive behavior verified
  • Follows code style and best practices
  • No merge conflicts
  • Reviewed by another team member

Related Issues

@dosubot dosubot bot added feature react Task that require react knowledge labels Jul 16, 2025
@alexanmtz
Copy link
Member

Hey @RismanRJ, thanks for the PR.

It's getting good, but what I can see here:
image

Is the topbar not expanding when it collapses, and the collapse icon should maybe be smaller and aligned?

I tried to make these adjustments but it's still not working as expected, here the branch:
https://github.com/worknenjoy/gitpay/tree/feat/collapsible-sidebar

I tried to change the grid space when it's collapsed but there's remaining space

So there's still some issues to address to make this work. Do you want to continue to try? Feel free to apply my changes and go from there if you have a solution.

@RismanRJ
Copy link
Author

@alexanmtz Hey thanks for the reply and I will look through the issue and try to close the PR ASAP

thank you

@alexanmtz
Copy link
Member

@RismanRJ we did changes recently to support mobile menu navigation on profile, so you need to sync with master before continue and resolve the conflicts

@RismanRJ
Copy link
Author

@alexanmtz Okay sure 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature react Task that require react knowledge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Collapsed menu and mobile friendly
2 participants