mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
On iPad landscape with a long board title, the controls were split across both rows: the title kept the left group (edit, visibility, watch, star, sort) beside it and only the right group (Filter / Search / view / dependencies / multi-selection / hamburger) wrapped underneath. That is what separate flex items do. The title, the left group, the centre group and the right group were four children of the #header-main-bar flex row, so the row filled with as many of them as fit and broke wherever it ran out - between the left and the right group. The three button groups now live inside ONE wrapper, .board-header-btns-group, so the row has just two items: the title and the buttons. Either the buttons fit beside the title or the whole set moves down together, under the title, which is what the report asked for. A short title is unaffected: the wrapper's flex-basis is auto, so it measures as its content width and only moves down when it genuinely does not fit - title and buttons still share one line exactly as before. The wrapper keeps flex-wrap: wrap so the groups can still break among themselves at widths where even the buttons alone do not fit. The h1 gains min-width: 0 / max-width: 100% / overflow-wrap so a title longer than the whole bar wraps inside the title instead of overflowing the viewport (a flex item cannot shrink below min-content without min-width: 0). The template change is a re-indent: every content line is unchanged, only its indentation, plus the new wrapper and its comment. exportHTML.js removed '#header-main-bar .board-header-btns' when exporting a board to HTML; it now removes the wrapper as well, so the export is not left with an empty div where the buttons were. Tests: tests/boardHeaderOneLine.test.cjs gains checks that all three groups are nested INSIDE the wrapper (by indentation, since sibling groups are exactly the bug), that the title stays a sibling of the wrapper so the row can break between them, that the wrapper's flex-basis stays auto (with `flex: 1 1 0` it would measure as zero width, never move down, and the split would come back), that the h1 can shrink and wrap, and that the export still strips the whole button area. Thanks to xet7 !