Skip to content

fix: make Sidebar scrollable#1029

Open
reillylm wants to merge 1 commit intomeshtastic:mainfrom
reillylm:fix/make-sidebar-scrollable
Open

fix: make Sidebar scrollable#1029
reillylm wants to merge 1 commit intomeshtastic:mainfrom
reillylm:fix/make-sidebar-scrollable

Conversation

@reillylm
Copy link

Currently, if our viewport is too short, the overflow on the Sidebar gets cut off and we can't see the buttons at the bottom:

meshtasticScroll1

Let's wrap this content in a ScrollArea so we can still see all the buttons on smaller viewports. We were previously using ScrollArea in the Nodes and Map pages, when filtering for devices by Role or Hardware.

This keeps the logo on top and makes just the buttons scrollable.

meshtasticScroll2.mov

Previously, we had given the page-specific buttons (e.g. the channel list on the Messages page) min-h-0, I'm guessing with the intent of shrinking them if there's too many (like a flex-shrink situation), but that property wasn't having an effect. Even if it had worked, hiding the page-specific buttons seems undesirable (e.g. when you're on the Settings page, you wouldn't be able to see the "Configuration" buttons). Also, our viewport could still be too short to fit the other buttons, so scrolling would still ultimately be needed.

Previously, we were hiding the DeviceInfoPanel buttons (theme / commandMenu / language) with invisible when the Sidebar is collapsed. However, invisible makes the elements still take up space (the h-0 wasn't having an effect in that regard), which was making the Radix ScrollArea think it had scrollable content in those spots. Instead, let's hide with hidden.

@vercel
Copy link

vercel bot commented Mar 12, 2026

@reillylm is attempting to deploy a commit to the Meshtastic Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Mar 12, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@danditomaso
Copy link
Collaborator

Can you merge/rebase main into your branch? It should fix the PR issues here.

Currently, if our viewport is too short, the overflow on the Sidebar gets cut off and we can't see the buttons at the bottom:

Let's wrap this content in a `ScrollArea` so we can still see all the buttons on smaller viewports. We were previously using `ScrollArea` in the Nodes and Map pages, when filtering for devices by Role or Hardware.

This keeps the logo on top and makes just the buttons scrollable.

Previously, we had given the page-specific buttons (e.g. the channel list on the Messages page) `min-h-0`, I'm guessing with the intent of shrinking them if there's too many (like a flex-shrink situation), but that property wasn't having an effect. Even if it had worked, hiding the page-specific buttons seems undesirable (e.g. when you're on the Settings page, you wouldn't be able to see the "Configuration" buttons). Also, our viewport could still be too short to fit the other buttons, so scrolling would still ultimately be needed.

Previously, we were hiding the `DeviceInfoPanel` buttons (`theme` / `commandMenu` / `language`) with `invisible` when the Sidebar is collapsed. However, `invisible` [makes the elements still take up space][1] (the `h-0` wasn't having an effect in that regard), which was making the Radix ScrollArea think it had scrollable content in those spots. Instead, let's hide with `hidden`.

[1]: https://tailwindcss.com/docs/visibility#making-elements-invisible
@reillylm reillylm force-pushed the fix/make-sidebar-scrollable branch from ba3df41 to 5d5525b Compare March 17, 2026 13:46
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.

3 participants