Skip to content

Conversation

@HDinger
Copy link
Contributor

@HDinger HDinger commented Jan 15, 2026

Ticket

https://community.openproject.org/wp/68833

What are you trying to accomplish?

In the new documents module, the mobile behaviour should be changed: Instead of showing the attachment tab (and future additional tabs) below the document, the TabNav should be extended by an additional tab called "Document". That new tab is shown at the first position.

Screenshots

Mobile
Bildschirmfoto 2026-01-16 um 08 57 26

Tablet
Bildschirmfoto 2026-01-16 um 08 58 05

Desktop
Bildschirmfoto 2026-01-16 um 09 01 24
(small)

Desktop (large)
Bildschirmfoto 2026-01-16 um 09 00 07

What approach did you choose and why?

The component relies on the browser gem to detect mobile and tablet device. That has two consequences:

  1. The layout will only work on reload (not on screen resize).
  2. Further, it needs a real device (or emulator) to work. Zooming in will break the layout. I added a fallback to make the module still usable though.

I decided for this approach, as the solution is much cleaner. A CSS only solution would require heavy inteference with the Primer components, while the way it is done now, just uses the Primer components by design

@HDinger HDinger added this to the 17.1.x milestone Jan 15, 2026
@HDinger HDinger changed the title Provide a standardized page layout for document full view [68833] Show document as separate tab on mobile Jan 16, 2026
@HDinger HDinger force-pushed the code-maintenance/68833-provide-a-standardized-page-layout-for-full-view-pages-like-document-full-view-2 branch from 67c9b45 to e0325df Compare January 16, 2026 08:14
@HDinger HDinger force-pushed the code-maintenance/68833-provide-a-standardized-page-layout-for-full-view-pages-like-document-full-view-2 branch from e0325df to 53401fe Compare January 16, 2026 08:26
@HDinger HDinger marked this pull request as ready for review January 16, 2026 08:27
@HDinger HDinger requested review from a team and psatyal January 16, 2026 08:28
…-page-layout-for-full-view-pages-like-document-full-view-2
Copy link
Member

@akabiru akabiru left a comment

Choose a reason for hiding this comment

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

I tested the layout and it's looking good! I think it's amazing that the code footprint is relatively small 🥇

…-page-layout-for-full-view-pages-like-document-full-view-2
…-page-layout-for-full-view-pages-like-document-full-view-2
@HDinger HDinger merged commit 1e07ffc into dev Jan 23, 2026
17 checks passed
@HDinger HDinger deleted the code-maintenance/68833-provide-a-standardized-page-layout-for-full-view-pages-like-document-full-view-2 branch January 23, 2026 09:30
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

3 participants