mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
The phone/desktop toggle writes an explicit choice and Utils.isMiniScreen() returns it as-is, so a phone whose user picked DESKTOP mode is not a mini screen and its body carries no `.mobile-mode`. Every fix written for one of those two did nothing there - while the viewport was still 375px wide. Three of them showed up in the same set of screenshots. "Create board" opened 160px from the left with its right half off the screen, so its Create button could not be reached. The geometry laid the popup out as a floating box of min(380px, 55vw) anchored to the button, while popup.css - which has given every popup the full width and its own 48px header below 800px for years - then made it 375px wide. The two disagreed, and the inline `left` from the geometry stayed. Now the geometry returns the top-left corner for any viewport that narrow, and the CSS pins the sheet with `position: fixed` and `inset-inline-start: 0` (with `!important`, because left/top are inline styles), so neither can drift from the other. The board bar's hamburger was pushed onto a third row of its own, with the empty space that goes with it: it comes after the buttons in the flex order, and a flex line breaks in order. The three mobile-mode rules that take it out of the flow and pin it to the corner - and reserve its width as end padding - are now also written by width. The quick-access bar was still wider than the screen, so the avatar was cut off at the right edge. The drag-handle toggle's arrows and its check/ban were breaking onto two lines, which reads as two buttons; they are one line now. The mode toggle gave up 21px of padding on each side of its two icons, and the logo 20px of its cap - about 60px of a 375px bar, which is what the avatar needed. The logo cap names the `.iphone-device` variant explicitly, since that one sets 84px with one class more and would otherwise win. tests/narrowWindowLayout.test.cjs replays the sheet decision at 375/800/801px and pins each of the three rules; the popupOffset suite gains the narrow-window case beside its mini-screen one. Thanks to xet7 !