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

Hide scrollbar in narrow IDE window with hidden device frame #852

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

p-malecki
Copy link
Contributor

@p-malecki p-malecki commented Dec 13, 2024

This PR addresses the issue of a scrollbar appearing when the IDE window is narrow and the device frame is hidden.
The scrollbar appeared because the touch-area for edge swipe gestures extends beyond the phone content width. To fix this, overflow: hidden is applied for windows narrower than 415px to override overflow: auto in phone-wrapper.

Before After
Screen.Recording.2024-12-13.at.12.28.07.mov
Screen.Recording.2024-12-16.at.10.48.55.mov

Copy link

vercel bot commented Dec 13, 2024

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

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:58am

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

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

Why does this work ok when device frame is present and breaks with frameless mode?

I don't agree swipe gesture isn't practical. It is equally practical regardless of how narrow the screen is

@p-malecki
Copy link
Contributor Author

Why does this work ok when device frame is present and breaks with frameless mode?

I don't agree swipe gesture isn't practical. It is equally practical regardless of how narrow the screen is

It works with visible device frame, because it covers touch-area. Without it we get extra pixels in each side which cause the scrollbar to appear.

Screenshot 2024-12-16 at 09 38 21Screenshot 2024-12-16 at 09 38 59

To keep the touch-area unrestricted by the phone-content, I moved the overflow: hidden to the phone-wrapper, and it works better.

Screen.Recording.2024-12-16.at.10.41.25.mov

@p-malecki p-malecki requested a review from kmagiera December 16, 2024 09:51
@kmagiera
Copy link
Member

ok, but why 415px is the breakpoint here?

@p-malecki
Copy link
Contributor Author

ok, but why 415px is the breakpoint here?

In fact, setting overflow: hidden in the phone-wrapper class works as well and also prevents from possible bugs.

@p-malecki p-malecki merged commit dbf16c3 into main Dec 16, 2024
4 checks passed
@p-malecki p-malecki deleted the @p-malecki/fix-scroll-for-no-device-frame branch December 16, 2024 12:15
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