Skip to content

feat: improve tablet and large-screen navigation layout#16764

Open
mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
mykh-hailo:feat/tablet-ux
Open

feat: improve tablet and large-screen navigation layout#16764
mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
mykh-hailo:feat/tablet-ux

Conversation

@mykh-hailo
Copy link
Copy Markdown
Contributor

@mykh-hailo mykh-hailo commented Mar 27, 2026

Summary

This change adapts the main file browser and several activities for tablets and wide layouts (typically sw600dp / w600dp) by using a persistent navigation column next to content instead of relying only on the sliding DrawerLayout pattern used on phones.

Closes: #14871

DrawerActivity is updated so drawer behavior works when the root layout is not a DrawerLayout (e.g. ConstraintLayout with a fixed-width nav region). Alternative layouts under layout-sw600dp align Compose, Navigator, Contacts preferences, Synced folders, and Upload list with the same idea. files.xml is refactored to support the sidebar + content structure and to keep ViewBinding (FilesBinding / drawer_menu) consistent. TrashbinActivity and toolbar_standard are adjusted for the new structure. New sidebar.xml and resource tweaks (bools, dims) support the tablet configuration.

Technical notes

  • DrawerActivity: Centralizes “menu layout” handling; drawer toggle, ActionBarDrawerToggle, and related APIs run only when the root is a DrawerLayout; optional hamburger visibility when the layout does not use a sliding drawer.
  • Resource qualifiers: layout-sw600dp (and related values-*) provide wide-screen layouts without affecting default (phone) resources.
  • File display: files.xml + sidebar.xml structure; FileDisplayActivity updated as needed for binding / initialization.
  • Consistency: Trashbin and toolbar spacing tweaks aligned with the new app bar / content arrangement.

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 Could you please check my PR for the tablet view?
Any feedback and advice is always welcome

Copy link
Copy Markdown
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

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

Hello, thank you for your PR.

Since these changes affect multiple screens, they will require thorough testing. To help the review process, could you please limit the scope to a single screen with minimal changes for now? Once that is reviewed and validated, we can proceed incrementally.

Additionally, please:

  • Exclude any .salive files from the PR (I updated gitignore)
  • Remove comments that restate obvious information (e.g., field descriptions that are self-explanatory)
  • Follow camelCase naming conventions (e.g., sidebarQuotaView instead of mSidebarQuotaView)

Thanks again for your contribution.

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

mykh-hailo commented Mar 30, 2026

@alperozturk96 Thank you for the updates.
All the code that handles the sidebar and drawer menu is implemented DrawerActivity, and it adapts to different screen sizes. I've also added the sidebar layout to the XML files where needed.

I initially tired to create a patch that only affects FileDisplayActivity, but it turns out that all related changes are required, except for the XML layouts. However, if the XML layouts for other activities are not updated, it may cause error during testing.

Could you advise on a simpler way to handle this so it's easier to test?

Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 I'd appreciate it if you provide me any updates on this PR.
Btw, I found a bug on your commit 7e3451077d836f542fcf63a11a1ed35d2f241048.
If we open, Community or Activities Activity, the app stops and this happens from the above commit.

@alperozturk96
Copy link
Copy Markdown
Collaborator

alperozturk96 commented Mar 31, 2026

@alperozturk96 I'd appreciate it if you provide me any updates on this PR. Btw, I found a bug on your commit 7e3451077d836f542fcf63a11a1ed35d2f241048. If we open, Community or Activities Activity, the app stops and this happens from the above commit.

Thank you for the contribution, this is definitely an improvement and adds value.

For the feedback, I’ll need to discuss with the team first. We have some pending big PRs that touch the same files, and since this is a significant change, we want to plan how to move forward step by step. I’ll keep you updated once we’ve aligned.

Regarding the fragment pushes, I didn’t observe any bugs or crashes, and the app ran as expected. If you’re seeing issues, it might be related to your development environment (for example, Dagger might not include the latest changes). If you do encounter a reproducible bug, please create an issue with the steps and crash logs so we can investigate further.

Demo:

a.mp4

@mykh-hailo
Copy link
Copy Markdown
Contributor Author

@alperozturk96 I'd appreciate it if you provide me any updates on this PR. Btw, I found a bug on your commit 7e3451077d836f542fcf63a11a1ed35d2f241048. If we open, Community or Activities Activity, the app stops and this happens from the above commit.

Thank you for the contribution, this is definitely an improvement and adds value.

For the feedback, I’ll need to discuss with the team first. We have some pending big PRs that touch the same files, and since this is a significant change, we want to plan how to move forward step by step. I’ll keep you updated once we’ve aligned.

Regarding the fragment pushes, I didn’t observe any bugs or crashes, and the app ran as expected. If you’re seeing issues, it might be related to your development environment (for example, Dagger might not include the latest changes). If you do encounter a reproducible bug, please create an issue with the steps and crash logs so we can investigate further.

Demo:

a.mp4

Sorry for missing one thing.
Open ActivitiesActivity and rotate the device please.
Same for CommunityAcitivty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance UX/UI for Tablet Devices

3 participants