hudy9x / namviek

The open-source project manager for tiny teams
https://namviek.com
MIT License
1.79k stars 206 forks source link

fix: layout shifting issue in mobile #198

Closed e-Naeim closed 2 weeks ago

e-Naeim commented 4 weeks ago

in packages/ui-app/app/[orgID]/layout.tsx the follwoing style style={{ width: 'calc(100% - 251px)' }} assumes that the sidebar is always opened, so if sidebar is closed, the layout doesn't take the full width, as temp solution remove the style.

furthere improvement can be done in future (a OR b): a. to make the sidebar in mobile device float over the content (like a drawer). b. attach listener to sidebar to know the status of it, and dynamically apply the style if sidebar is opened and remove it if sidebar is closed.

vercel[bot] commented 4 weeks ago

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

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **namviek-5o9o** | ⬜️ Ignored ([Inspect](https://vercel.com/hudys-projects/namviek-5o9o/Ce2PgyQKeb3CKYEhrgx8Qbb33yAo)) | [Visit Preview](https://namviek-5o9o-git-fork-e-naeim-fix-layout-6ea8ff-hudys-projects.vercel.app) | | Jun 5, 2024 10:58am |
hudy9x commented 2 weeks ago

Can't use this PR for now I need a solution that can detect mobile version on server side.