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

Fix overflow-x on AppContent #88

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

Conversation

filip-codes
Copy link

Reason for the PR

In every new project, I make a small but essential change: I set overflow-x-hidden on AppContent.

Why?

Components like shadcn/table can cause unexpected horizontal scrolling on dashboard.tsx. To ensure a smoother experience, I want only the AppContent to be scrollable—without affecting the entire layout.

Before (Desktop)

Screen.Recording.2025-03-22.at.20.57.13.mov

After (Desktop)

Screen.Recording.2025-03-22.at.20.55.05.mov

Before (Mobile)

Screen.Recording.2025-03-22.at.20.58.51.mov

After (Mobile)

Screen.Recording.2025-03-22.at.21.00.07.mov

@tnylea
Copy link
Contributor

tnylea commented Mar 31, 2025

Thanks for the video examples. I just tested it out, and everything works fine with that overflow class. Approved 👍

@tnylea tnylea added Approved Approved for Merge Awaiting User Response Waiting for developers response and removed Approved Approved for Merge labels Mar 31, 2025
@tnylea
Copy link
Contributor

tnylea commented Mar 31, 2025

Hey @filip-codes, On second thought, I feel that this PR, #90, will be better suited to handling tables and other UI elements that have a large width.

Can you let me know if adding the max-w-full to the <main> element in the sidebar layout resolves the issue you were seeing as well.

Thanks!

@filip-codes
Copy link
Author

Hey @tnylea, thanks for your response!

I’ve looked into #90, which fixes the max-width issue on the sidebar when variant="inset".

This PR addresses a different issue: when scrolling horizontally, the header disappears behind the navigation bar due to overflow-x. I tried setting max-w-full on the <main> element, but it didn’t seem to have any effect.

@filip-codes
Copy link
Author

filip-codes commented Mar 31, 2025

Here's the result with max-w-full set on <main>:

Screen.Recording.2025-03-31.at.22.39.01.mov

Please compare it with the "After" results above. (The header does not move)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting User Response Waiting for developers response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants