Fix layout issues in application view caused by missing width constraint#2482
Conversation
The Application view's per-resource wrapper was missing the 'width: max-content; min-width: var(--app-content-width, 100%)' rule that Table and View pages already apply. This caused two visual bugs exclusive to the Application view: - On narrow viewports, the resource title row had no room to expand horizontally, causing the title text to wrap onto multiple lines. The options bar (search/create-row) is positioned at a fixed top: 60px offset and overlapped the wrapped lines. - On wide tables with horizontal scroll, the sticky header backgrounds ended at the viewport width. Scrolling sideways revealed table content underneath the header area. Aligns Context.vue with the existing pattern in Table.vue and View.vue where the same two CSS lines are already present. Signed-off-by: Samuel Barmet <samuel@barmet.ch>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
When the Application view was built, the per-resource wrapper (.resource) was not given the same width constraint that the Table and View pages already have:
This single missing rule causes two visual bugs that only appear in the Application view.
Bugs fixed
Bug 1 — Title row wraps on narrow viewports
Without a max-content width on the container, the title row is constrained to the viewport width. On narrow screens, the title text wraps onto multiple lines, making the title row taller than expected. The search/create-row bar is positioned with a fixed top: 60px offset, so it ends up overlapping the wrapped title lines and — at very narrow widths — even the table rows below.
Bug 2 — White header background does not extend on horizontal scroll
The sticky header backgrounds (title and options bar) inherit the container width, which is viewport-wide. When the table is wider than the viewport and the user scrolls horizontally, the white background ends at the right edge of the viewport, revealing the table content underneath the header.
Fix
Added the two missing CSS lines to .resource in src/pages/Context.vue:
This is exactly how Table.vue and View.vue already handle the same layout. The fix aligns the Application view with the existing pattern in the codebase.