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

keeping sidebars and header visible on mobile view #949

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

404mike
Copy link
Contributor

@404mike 404mike commented Jan 5, 2024

Description of what you did:

Modified CSS rules to keep sidebar and header visible when on mobile view. Relating to issue #938

Copy link

codesandbox bot commented Jan 5, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Jan 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universalviewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 5, 2024 2:01pm

Copy link

codesandbox-ci bot commented Jan 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 125a86d:

Sandbox Source
React Configuration
uv-react-demo Configuration
uv-simple-example Configuration
uv-simple-example-with-url-adapter Configuration
uv-config-example Configuration
uv-nextjs-example Configuration

@@ -32,6 +32,9 @@ export class LeftPanel<
this.options.panelOpen
);

const viewportWidth: number = document.documentElement.clientWidth;
if(viewportWidth <= 767) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the functionality that this provides, but I wonder if we can implement it in a more flexible way that avoids hard-coded magic numbers. Might it make sense to replace the panelOpen boolean configuration setting with a panelOpenMinWidth integer setting? Then it could be 0 to always open, some incredibly high number to always close, or a configurable breakpoint the rest of the time. What do you think? @edsilv?

Copy link
Contributor

Choose a reason for hiding this comment

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

@demiankatz One possibility that avoids any config stuff would be to assume that this behaviour is only needed when it's a portrait-oriented, touch-enabled device, which I think in 99% of cases would be a phone/tablet?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's true, but I think @edsilv's point was that displaying the sidebar on mobile isn't the ideal solution to the problem, regardless of what approach we take for deciding to do it. Though if it's an urgent local need, I think the approach here might be able to be locally adopted as a workaround until the more complete solution is ready.

@demiankatz
Copy link
Contributor

This was discussed on the December 5, 2024 Community Call; the general consensus is that we should try to implement the left sidebar navigation as a pop-up modal in mobile for a more consistent user experience, rather than making the existing panels visible in mobile. We should devote some time to this early next year and create a new PR to supersede this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Work in progress
Development

Successfully merging this pull request may close these issues.

4 participants