mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
b77a1663d80cb3ee5d876c491da8508ca5f403bc
72
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d5b69137cc |
Font size setting moves all of the text, not the part written in rem.
Picking Largest grew the page heading and the minicards and left the header bar, the left menu, the lists, the swimlane header and every popup exactly as they were. The preset was a percentage on the root element, and a root percentage only reaches text whose size is written in a relative unit: rem is measured against the root, em against its parent. WeKan writes most of its sizes in px, and px is absolute, so exactly the rem-sized parts scaled. The base rule made it worse: html, body, input, select, textarea, button re-stated font: 14px, so the body took the stock size straight back off the scaled root. The preset is published as a number as well (--wekan-ui-font-scale), and every px font-size and line-height in the client stylesheets - 433 declarations across 37 files - is written calc(14px * var(--wekan-ui-font-scale, 1)). line-height scales with the size on purpose: 21px of type in an 18px line box is the same setting half-applied. The base font rule is split into font-family and font-size, because the shorthand's size was the one thing the setting had to be able to move. Nothing renders differently until a preset is chosen: the fallback is 1 and the variable is removed for Default. tests/uiFonts.test.cjs fails on any bare px font-size or line-height, so a new one cannot quietly opt out of the setting; the two density guards unwrap the calc as they read the file, so each still pins the size it means. Thanks to xet7 ! |
||
|
|
c6ad795629 |
Edit a title where it is written: a card's on the board, a board's in the header bar.
A list's title has always been edited in place. A card's could only be changed by opening the card, so fixing a typo on a board of forty cards was open, edit, close, forty times. Clicking a minicard's title text now opens the same inlinedForm the list heading uses - textarea, Save, X - for anybody who may write; the complete checkbox, the linked-card icons and the card number keep doing what they did, and the rest of the card still opens the card. The minicard sits inside the link to the card, so a click in the open editor would have navigated away mid-rename. That default is cancelled, except on the Save button whose own default IS the submit. An empty save is a no-op rather than a way to end up with a card that has nothing to click. The board's name had a pencil beside it: two targets for one job, and the smaller of them was the one that did it. The name itself now opens the same boardChangeTitlePopup the pencil opened, with the board as its data context because the header bar's context is the page. A board whose title is empty renders no text, and a zero-width element cannot be clicked, so the clickable title carries a minimum width and height - an empty title can still be given one. tests/titleClickToEdit.test.cjs pins both ends, including the two negatives: the save button keeps its default while everything else in the editor does not, and the empty title stays clickable. Thanks to bonnebulle and xet7 ! Fixes #4990, |
||
|
|
93042642f4 |
The All Boards house starts at the same X at every window width.
The house at the start of the first header bar sat further in on a wide window
than on a narrow one, and on none of them on the line the left menu's rows below
it start on.
Its inset is a SUM, and two of the terms were added at some widths only:
* #header carried side padding of its own - 8px below 800px, 16px between 768
and 1024, none between 1024 and 1920, 8px above 1920. Four widths, four
different insets. It has none now, at any width: the inset of this bar is
the bar's own gutter, once. The gutter is on the BAR rather than on its
first item because the bar wraps, and padding applies to every row it wraps
onto while a margin on the first item would indent the first row only.
* .allBoards is the SAME element as .home-icon - span.home-icon.allBoards - so
its side padding lands between the icon's margin and the link, and it was
15px on a desktop against 6px on a phone. It carries padding-block only now.
That 15px was also the gap to the logo beside it; the gap is the 4 + 4 of
the two margins, like every other pair of neighbours in this bar.
And the link's own start padding is the same 6px in every rule, phone rules
included: at 8px, and at 12px on a small phone, a bigger tap target was growing
at the START, which is the inset, rather than at the end.
So the house is at 12 (the bar's gutter) + 4 (the icon's margin) + 6 (the link's
padding) = 22px at every width - the same 22px the left menu's rows are indented
by (4px of margin plus 18px of padding), so the two are one line down the page.
The existing guard added up the three terms it knew about and got 22, and passed
while the house still moved, because the two terms above were not in its sum.
The new one pins the other side of it: no rule, at any width, may add a side
inset of its own.
Thanks to xet7 !
|
||
|
|
28a5973c6b |
1st top header bar: start where the left menus start.
The All Boards and Admin Panel left menus indent a row by 4px of row margin plus 18px of link padding, so a row's icon lands 22px from the window edge. The first header bar sat flush against the edge, so its home icon started 10px in and every button under it was a little to the left of the menu below. The bar now carries a 12px inline gutter: 12 + 4 + 6 = 22, the same x as the menu rows. It is on the BAR rather than on its first item because the bar wraps - padding applies to every row it wraps onto, while a margin on the first item would indent the first row and leave the second starting at the edge. The number is a variable, --wekan-header-gutter, so it has one home, and the phone overrides that set the bar's padding use it too rather than putting the bar back against the edge at the widths where the alignment matters most. The guard adds the three numbers up out of the three stylesheets rather than pinning any one of them: a test that asserts "18px" passes while the alignment is broken by a change to one of the other two. It also checks that the two left menus indent by the same amount as each other - they are meant to look like one kind of menu - and that no override sets the bar's inline padding to anything but the gutter. Thanks to xet7 ! |
||
|
|
27cfc214b5 |
All Boards / Archive is board icons, and a board can come back by dragging it.
The Archive had a table of its own, which meant the one place you go to bring a board back was the one place multi-selection, dragging and the tile layout did not work. It is drawn with the same board icons every other section uses now, and the differences are the ones that have to be different: no "Add Board" tile, because a board cannot be created already archived, and each tile says WHEN it was archived, which is what tells one old board from another. Four things had to change for that. The section's query asks for archived boards - the one section whose query is the opposite of every other one's - and the menu filter has its own branch for it, because a workspace assignment survives archiving and the workspace branch would have hidden most of an archive. The page subscribes to them, and only while that section is open. The count beside the menu row comes from a method and says how many there are, not what they are. The autorun is placed AFTER selectedMenu and boardSearchVar are assigned: an autorun runs once immediately, so above them it read .get() off undefined and threw during onCreated - which it did, and xet7 saw it. The publication sends what a tile draws. It sent seven fields to a template that reads twelve, which would have rendered grey, nameless tiles. And the board publication no longer withholds an archived board. It excluded one unless it was a template, so following a tile's link answered "board not found". Archived is not a permission: what decides whether the document may be sent is the membership clause beside it, and that is untouched. The isArchived argument still governs the CONTENTS, so an archived board opens showing its live lists. Dropping a board on Remaining brings it back - one board or a whole multi-selection, which is the point of dragging rather than opening each board's own menu. It restores through a new restoreBoard method gated exactly as archiveBoard is: board admin or a global admin. The two must agree, or one of them is the wrong way round, and the guard checks them against each other rather than each against a copy of the rule. Also, from the same screenshots: the home icon and the notification bell now begin a row at the same x - 4px of margin and 6px of padding each, where the bell carried 10px from its own stylesheet and the house 8px - and the space after the username matches the space before the avatar, which it did not on a page whose bar ends with the name because nothing followed it to provide the rest. Thanks to xet7 ! |
||
|
|
c6f266139c |
A selected workspace highlights, and the username's space is split.
The workspace highlight was styled for a class that never appeared. `active` is
set by `{{#if $eq id selectedWorkspaceId}}` inside `each nodes` - but
selectedWorkspaceId is a template ARGUMENT, not a helper, and inside `each` the
data context is the NODE. So the bare lookup found nothing on the node, `$eq`
compared an id with undefined, and no workspace was ever active. Two commits ago
I gave that class the theme colour and reported it done; the colour was right
and nothing wore it.
`../selectedWorkspaceId` now, in the test AND in the recursive call - the second
matters as much, because passing the bare name handed undefined to every nested
level, so a child workspace could not have highlighted even once the top level
worked.
The username's own space is split 4px each way rather than 8px stacked after the
name, so the divider on its left no longer touches it. And the avatar's end
margin is no longer zeroed on narrow screens: that was written when the name was
hidden there, so nothing followed the avatar and the gap was waste - the name is
shown at every width now and the avatar was touching it. Second rule in this
stylesheet written for a hidden username and left behind when it stopped being
hidden, so the guard walks every rule that touches the avatar rather than
pinning this one.
And a guard of mine was silently blind. ruleWith() splits the stylesheet on
braces, and I had written a comment containing `a { color: inherit }` - a brace
inside a comment breaks that splitting for every rule after it, so the rule
being looked for was simply never seen and the guard failed against correct CSS.
It strips comments from the whole stylesheet before splitting now, which fixes
it for every comment anyone writes later rather than for this one.
Thanks to xet7 !
|
||
|
|
b2114f2763 |
Header bar: the username, the pencil, the avatar, and the gap after the house.
Four things, all in the first bar, and three of them were things going MISSING. The rename pencil vanished on a narrow window. The rules that collapse the home link's label were written as '.home-icon a' - and the pencil is an anchor in the same box, so font-size: 0 reduced its icon to nothing too. The home link carries 'header-home-link' now and all 24 of those selectors name it, so a rule about one anchor stops applying to its neighbour. The username was collapsed below 800px. That is gone: the bar WRAPS now, so a name that does not fit costs a row rather than an avatar shoved off the edge, and who you are signed in as is worth that row. The class that exempted All Boards and the Admin Panel went with it, along with its helper - with nothing left to exempt from, it decided nothing, and a mechanism that decides nothing still reads as one that does. The avatar sat low. It was floated and nudged up 5px with position: relative - a float takes an element out of the flex alignment, so it was being lined up by hand against a row whose height changes with the buttons in it. Its parent is a centred flex row now and both hacks are gone. And the gap between the house icon and the page title was 12px against the 8px every other pair of neighbours has: the icon carries a 4px end margin and the link added 8px of its own. The link's END padding is 4px now. Its START padding stays at 8px - that one is the link's inset from the edge of the bar, not a gap between two things, and the guard says so rather than pinning both to one value. Thanks to xet7 ! |
||
|
|
259aa81e2e |
Header bar: your account and the sidebar toggle sit at the end.
The divider, your avatar and name, the second divider and the sidebar hamburger are one group now, aligned to the END of the bar - the right edge in a left-to-right language, the LEFT edge in a right-to-left one. One margin-inline-start: auto does both, because it is a logical property and the mirroring is what the browser already does for the writing direction. This is the one group that is placed rather than packed, and the exception is the point: everything before it belongs to the PAGE and reads in source order from the start, while these five are not about the page at all. The divider is the seam between the two, so the bell stays on the page's side of it. A box rather than display:contents, unlike the page's button groups. Those dissolve so their buttons wrap one at a time; these five belong together, and an avatar left on the first row with its hamburger on the second is worse than the cluster moving down whole. On a row that wrapped there is no free space for the auto margin to absorb, so it packs from the start there and fills the row. The guard that forbids pushing anything in this bar now carries that one exception by name, and a second guard checks the group holds those five in that order and that the bell is outside it - so "aligned to the end" cannot quietly become "everything after the bell", which is a different rule. Thanks to xet7 ! |
||
|
|
b8fb5a95f1 |
Header bar: the username is the colour the buttons are.
It took whatever the bar passed down, because a { color: inherit }, so it did
not match Notifications and the rest sitting beside it - and it is a control of
the same bar, not a caption. It is #f2f2f2 now, the value the buttons declare,
and the guard compares the two rules rather than pinning the hex, so changing
the buttons' colour without changing this fails instead of drifting apart.
And one last auto margin is gone. #header-user-bar had margin-inline-start: auto
in layouts.css, which pushed it to the far end of the row - the behaviour
removed everywhere else two commits ago. It survived because it lives in a
different stylesheet than the others did, which is exactly why the guard now
looks for it there too.
Thanks to xet7 !
|
||
|
|
b064a509fb |
Header bar: the logo gets the same space on both sides as everything else.
It had 16px on its left and 4px on its right. The page title's margin-inline-end was 1rem and the logo carried no margin of its own, so the gap on one side came entirely from its neighbour and the other side got only the phone toggle's 4px. Both are 4px now, like every item of this bar, so the gap between any two neighbours is 8px - the drag-handles toggle included, which was the same fault fixed one commit ago. The logo needed a class before it could carry a margin: it is drawn by three different branches - a custom logo that links, a custom one that does not, and the stock one - and none of them had one. All three carry header-logo now, so the spacing does not depend on which is configured, and the guard counts all three rather than trusting that the one it can see is the only one. Thanks to xet7 ! |
||
|
|
f435e55840 |
Header bar: the same space on both sides of the drag-handles toggle.
It had 18px on its left and 8px on its right, which reads as a hole rather than as spacing. The phone/desktop toggle beside it carried 'margin: 0 14px' while everything else in the bar carries 4px, so the gap to its left was 14 + 4 and the gap to its right 4 + 4. The toggle carries 4px now, like every other item, so the gap between any two neighbours in the bar is 8px. Equalised by making the margins the SAME rather than by picking two numbers that add up to the same total - the guard checks both, so a future change that balances the sum by making the parts unequal still fails. Thanks to xet7 ! |
||
|
|
2fb4f47120 |
Header bar: the board's controls wrap one button at a time, not as a block.
The first row ended after the star group with half the bar empty while the second row was full - Private, Muted, Sort Cards and the rest had all moved down together. They sit in one wrapper div, .board-header-controls, and a wrapper div is ONE item to the bar: when the last button of the group did not fit, the group went to the second row entire. That is exactly the fault .header-quick-access-end had, one level further in - fixed there weeks of edits ago and left here because this group is drawn by a different template. It generates no box now, and so do the Admin Panel's four tabs. #notifications and the divider-plus-hamburger stay boxes on purpose: the first also contains the drawer that opens under the bell, and the second is a pair that means nothing apart. Both classes are named in the selector. These elements carry .board-header-btns too, and the flex rule beside it matches them at the SAME weight - so naming only the modifier would have left which rule applies to source order, and my first attempt did exactly that and lost. Checked, 120 against 110, rather than assumed. Thanks to xet7 ! |
||
|
|
3a391ea813 |
Header bar: one run of items from the start, and every button keeps its name.
Two things, and the first makes the second possible. Nothing in the bar is pushed to the far end or centred any more. Three rules did it: an auto margin on the first button after the drag-handles toggle, which sent everything from there to the right edge; an auto margin on the user menu on phones; and an auto margin on EACH side of the bell, which centred it in whatever space was left. Each of them puts a hole in the middle of the row, and which items land on which side of the hole changes with the window width. The bar packs from the start and wraps forward now - left to right in a left-to-right language, right to left in a right-to-left one, which flexbox does by itself because it follows the writing direction, so there is no second rule to keep in step. .header-quick-access-end stays display:contents. It carries no alignment now, but that is what makes its buttons items of the BAR: as a flex box of its own it was a single item, and the whole group dropped to the second row together. And the button names are shown everywhere, at every width. They were dropped when the bar ran out of room - first below a fixed 1100px, then by measuring whether the bar had wrapped - and xet7 has now asked for them on boards too. So the measurement decides nothing, and it is deleted rather than left inert: 111 lines of utils.js, the CSS rule it drove, and 43 lines of guard that described it. A mechanism that no longer decides anything still reads as one that does. The bar wraps, and a wrapped second row is a better answer than a row of unlabelled pictures. header-keeps-text stays, because it still has a job: the USERNAME, which the narrow-screen rules collapse everywhere except All Boards and the Admin Panel. Its comments say that now rather than talking about labels. An older guard pinned the phone centring on purpose, with a paragraph on why the bell sat midway. That decision is reversed, so the guard is rewritten to the new rule and says what changed - and the new one checks the SHAPE: no rule that positions something within the bar may use an auto margin or a justify-content. A justify-content inside a button centres that button's own icon and is not alignment of the bar's items, so the check is scoped to rules on the bar itself. Thanks to xet7 ! |
||
|
|
51b04f660b |
Header: keep the username, name the bell, and clear the grey around All Boards.
Three things. The username stays at every width on All Boards and the Admin Panel. The narrow-screen rules collapse it to font-size: 0 - the avatar stays, the name stays in the DOM for screen readers - because a full name is easily 100px of a 375px bar. These two pages carry four buttons rather than a board's ten and have the room, and the name is who you are signed in as. Every hiding selector is answered with its own copy carrying the class: the widest of them carry .iphone-device, which outweighs an id and a class on its own, so one short override would have lost on exactly the narrow screens this is about - checked, 250 against 240, rather than assumed. The class that marks those pages is renamed from header-labels-always to header-keeps-text, and its helper to keepsText(). It keeps two kinds of text now, and a name saying "labels" would have lied about half of what it does. The bell is named beside its icon, from the key its own tooltip already used, carrying the same label class as every other named button - so it appears and vanishes with them rather than needing a rule of its own. Its stylesheet makes it a fixed 28px SQUARE, which is right for a lone icon and clips a word, so in this bar it sizes to its content and lays icon and name out like its neighbours. Scoped to this bar: elsewhere the toggle is still just a bell. And the grey above and to the left of the All Boards menu is gone. It came from #content > .wrapper, which is margin-top: 10px and padding: 15px as well as the width inset - the margin was the grey above, the padding the grey to the left. My earlier override set width and margin only, so the padding survived; and it weighed exactly as much as the rule it answered, so which applied came down to stylesheet order. .wrapper.all-boards-wrapper carries one class more, which settles it, and the padding is zeroed too. Three guard mistakes of mine here, all caught by running rather than reading, and all the same mistake: indexOf on a selector matches whichever rule comes first, and a selector usually appears more than once - the ordinary styling, a phone override, the rule you meant. Rather than fix each site again, this file now has ruleWith(css, selector, declaration), which names a declaration too and asserts it found exactly one. Its own first version failed as well, because the regex capture runs from the previous closing brace and so carries the comment written above a rule; it strips comments from the selector now. Thanks to xet7 ! |
||
|
|
39dcdcb79e |
Header labels: measure whether they fit, instead of guessing from the width.
The labels were hidden below 1100px, and a width cannot answer the question. A board carries ten controls, All Boards four, an Admin Panel page four tabs, and the words are as long as the reader's language makes them. xet7's screenshots show both failures at once: at 2266px the labels were shown and the bar wrapped anyway, and at 1810px they were hidden with a whole row to spare. fitHeaderLabels() shows the labels, asks the bar whether it wrapped - its last item sitting lower than its first - and hides them if it did. A tolerance rather than equality, because items of different heights sit on slightly different offsets within one row and align-items: center moves them. It always measures from the SHOWN state. Hiding the labels is what makes the bar fit, so measuring after hiding would answer "it fits", show them again, and do that once per frame forever. Removing the class before measuring costs one reflow per resize and is the whole reason this cannot oscillate - the guard pins that ordering, because it is the one thing here that is not obvious from reading. It runs from the same place that publishes --wekan-header-height, which already has a ResizeObserver on this bar - and wrapping is exactly what that observer exists to catch. Also in this commit, from the same screenshots and the same session: The pager buttons are FILLED with the theme and their arrows white, instead of an outline on transparent that put the theme in a 1px border and left the button a ghost beside solidly themed chrome. They read --theme-accent-fill, a new variable, because --theme-accent is one COLOUR and a colour-slide theme's fill is a gradient: a button reading the accent came out flat while the header above it slid. activeFill() resolves it - a custom pair beats the theme's own slide, the way a custom colour beats an accent - and the pressed state darkens that fill rather than replacing it, which keeps a slide sliding. And both left menus run from directly under the header to the bottom of the window, flush to its left edge. The Admin Panel's row carried a top padding that put grey above the menu; the main body carries it now, because content is not meant to be flush against a bar. Both menus lost their border and corner on the three flush sides: a rounded corner on a flush edge shows the grey behind it, which is the gap being removed. All Boards' grid uses column-gap, since a gap is between tracks and never insets the menu from the window edge. One correction of mine: activeFill's comment claimed it answers null for an unknown theme. accentOf answers '' and activeFill defers to it, so it answers '' too. The comment now says so - the two functions sit side by side and a reader should not have to remember which returns which kind of nothing. Thanks to xet7 ! |
||
|
|
dfaf196a83 |
Header bar: name the buttons where there is room, drop the names where there is not.
Sort Cards, Filter, Search and Show Dependencies carry their name beside the icon now, and so does the board's Multi-Selection alongside All Boards' and the two view menus. A tooltip is the one place a name cannot be read without hovering. Below 1100px every one of those labels goes and the buttons are icons again. A label is worth several icons' width, so on a narrow window keeping them costs more buttons off the first row than the names are worth - and the tooltip is still there for all of them. All of them together, not some. Half the buttons named and half not reads as a bar that has been half finished, and WHICH half you got would depend on which words happen to be short in your language. One rule hides the one class they all share, so none can be left behind - which is also why the first attempt at this, an is-optional class on four of the six, was not worth keeping. The threshold is the window rather than a container query: what a container query would measure is this bar, and this bar is as wide as the window by construction. Each label uses the SAME translation key as its own tooltip, so a button and its tooltip cannot say different things, and a button whose name changes with its state - Sort is on, Hide dependencies - says the state in both places. The guard checks that pairing per button rather than only that a label exists. Thanks to xet7 ! |
||
|
|
9a1463d7e0 |
Header bar: fill each row before starting the next.
The bar wraps when its buttons do not fit, but everything after the drag-handles toggle was wrapped in .header-quick-access-end, and a nested flex box is ONE item to the bar - so the whole group moved to the second row together. The first row ended halfway across with nothing in the rest of it while the second row was crowded, which is the opposite of what wrapping is for. The group is display:contents now: its box is not generated, so its buttons are items of the BAR and wrap one at a time. The second row takes only what did not fit on the first. The group stays in the markup - it is what says where the end of the bar begins - and the auto margin moves to its first child, the item that has to push the rest to the end. That still mirrors by itself in a right-to-left language, because margin-inline-start is logical. On a row that wrapped there is no free space for the margin to absorb, so those items pack from the start, which is what fills the row instead of stranding it. Thanks to xet7 ! |
||
|
|
f62258b5cb |
Header bar: one star group, named view menus, and a Filter button that shuts.
The bar drew TWO stars in a row - one on the starred-boards dropdown and one for the board you are on - which reads as a single control somehow drawn twice. The dropdown has no star now: it is a caret and the COUNT of starred boards, which is what it is about, and the count is shown even at zero because it is the button's only label and a bare caret says nothing about what it opens. The board's own star sits immediately beside it, and the two are wrapped in a rounded outline of their own, shaped like the phone/desktop toggle's but WHITE where that one is black: the toggle is a white box sitting on the bar, so a dark border shows against it, while these buttons sit on the bar's own colour and need a light one. Without an outline the two read as unrelated icons that happen to be adjacent - which is what made the two stars confusing in the first place. The star is its own template so the bar can place it here rather than among the board's other controls further along. A Blaze event map only sees events inside its own template, so its helpers and its click came with its markup, and the copies left behind in boardHeaderButtons are gone. The two view menus and Multi-Selection carry their name beside the icon again. I had made them icon-only earlier and xet7 asked for the words back; that is the better call - six view glyphs are six things to learn, a check-box outline says nothing about multi-selection, and a tooltip is the one place a name cannot be read without hovering. The bar wraps to a second row when it runs out of width, which is what makes the word affordable now and did not before. Sort, Search and Boards in Archive stay icons: those glyphs are well known. A label does not wrap mid-button - two lines inside a one-line button is worse than the tooltip was. Clicking Filter while the filter sidebar is already showing closes it. It only ever opened, so a second click did nothing visible and the only way back was the sidebar's own X, somewhere else on screen from the thing you just clicked. Not while a filter is ON, though: the sidebar is then the one place that says WHAT is being hidden from the board, and closing it would leave a board showing a subset of its cards with nothing on screen to say so - so it stays open, and the X beside the button is what clears the filter. "Showing the filter" is open AND on that view, because a sidebar open on Activities is not showing the filter and clicking Filter there has to switch to it rather than close the panel. models/lib/filterButton.js holds that rule so "which way does this click go" is answered once, and the guard checks all four combinations without a DOM. tests/mobileModeConsistency stopped expecting js-star-board among the board header buttons and says where it went instead; tests/headerBars pins the group, its light-against-the-bar outline, the labels, and the filter toggle. Thanks to xet7 ! |
||
|
|
49f4e77aae |
First header bar: wrap rather than clip, and say where you are.
Six things, all in the one bar that is always on screen. The bar wraps. It was one row with `overflow: hidden`, so a button that did not fit was not drawn at all - and a button that is not drawn gives no sign that it exists. It is `flex-wrap: wrap` now with a row gap, and every height on it became a minimum, including the four phone rules that pinned 40px or 48px: a content box with a fixed height cannot hold two rows, so it would have cut off exactly what the wrap was for. A phone is where the buttons run out of room first, which makes it the last place that should hide them. Everything after the drag-handles toggle hugs the end of the bar, from one `margin-inline-start: auto` on a new `.header-quick-access-end` wrapper. That is a LOGICAL property, so a right-to-left language mirrors it by itself rather than needing a second rule kept in step with the first. Both view menus are icons now. The board's said "Swimlanes" beside its icon and All Boards' said "Lists"; the name is in the tooltip instead, where the other buttons of that bar already keep theirs. `boardViewName` maps the six views to their own keys, so the tooltip says which view is on. The button of the page you are ON keeps the hover background, a shade darker and permanently. The Admin Panel's tabs have marked themselves `.active` all along, but the only rule that drew it was scoped to `#header-main-bar` - the second bar, which those tabs no longer live in - so the state was computed and invisible from the moment they moved. Darker than the hover rather than equal to it: hovering the tab you are already on must still look like a hover. The Admin Panel says which of its four pages is open - "Admin Panel / Settings". All four of its routes answered the same key, so the bar said the same three words on every one of them. The second segment uses the same translation key as the tab's tooltip, so the title and the tab that is marked active cannot drift apart. Only the Admin Panel has one; a page whose name is the whole answer gets no slash, and neither does a board, whose own title IS its name. A sidebar button is no longer drawn under the close button. `.sidebar-xmark` is `position: absolute`, so it contributes no height and the row holding it collapsed to its padding - on a board that row also holds the keyboard shortcut buttons and so has a height anyway, which is why only the All Boards and shared page sidebars showed it. Two mistakes here were reverted rather than patched, because patching them would have left the damage in the file. A regex rewriting `header.css` matched inside `min-height` and produced `min-min-height`; and a slice of `boardHeader.jade` ran backwards, deleting every template between `boardVisibilityList` and `boardViewMenu` - that is what `Template.boardChangeTitlePopup is undefined` and `Template "boardVisibilityList" is set twice` were. Both files were restored from git and redone with exact replacements. Guards in tests/headerBars.test.cjs pin all six: that no rule on the bar forces one row, clips, or fixes a height; that the end group is pushed with a logical margin and never a physical one; that each view menu names its view through a real translation key; that the active mark is darker than the hover and survives being hovered; that the Admin Panel's second segment shares its key with the tab; and that both sidebars reserve the close button's height. The wrap guard reads the DECLARATIONS, not the comments - the rules that replaced these explain themselves by naming `nowrap` and `overflow: hidden`, and a guard that greps the whole body reads its own explanation. Thanks to xet7 ! |
||
|
|
7243ced8d6 |
Header: hide the empty second bar, and style the buttons that moved up.
Two things the screenshot showed, both consequences of emptying the second bar that I had not followed through on. A TALL EMPTY BLUE STRIP under the first bar, on every page. `#header` is a coloured block with a height of its own, and most pages have no second bar any more - their title is in the bar above and their controls are in a sidebar - so it painted an empty band wherever there was nothing to put in it. It renders only where a page still has a header bar now. CRAMPED BARE GLYPHS in the first bar. Every rule that styles a `.board-header-btn` was scoped to `#header-main-bar`, which is the SECOND bar - so the page's view menu, the starred-boards dropdown, the Admin Panel tabs and the sidebar hamburger, all of which moved UP into the first bar, had no padding, no height and no line-height and ran together into one another. The first bar states the same look for its own buttons, with its own divider. That is the same mistake as the All Boards search box, which kept matching `.boards-path-header .board-search` after it had moved: a control that moves between containers takes its stylesheet with it or stops being styled at all, and nothing says so until somebody looks. Thanks to xet7 ! |
||
|
|
ffacc9a7dc |
Header: one colour, the page's own name, and one hamburger.
First of the header restructure. Three things, all in the bar that is always on screen. ONE COLOUR. Each theme painted the two bars two shades apart, so the header read as two headers stacked. They are one colour now, and per theme it is stated once: the quick-access bar joins the selector list the main bar already has, rather than restating each hex a second time. moderndark said it its own way and was the one theme where the two really differed (#2a2a2a against #333); it is on the main bar's colour like the rest. THE PAGE'S NAME, not "All Boards". The first bar said "All Boards" beside its house icon on every page, whatever page it was - so the bar that is always visible named a place you were not. The house is still the link home, with that name as its tooltip; the text beside it is where you ARE, and on a board that is the board's title. models/lib/pageTitles.js maps a route to a title key, which is one answer to "what is this page called" in place of the thirteen `h1`s that each answer it separately. A board title is printed as TEXT and a page title goes through the translator: a board called "settings" is not the Admin Panel. ONE HAMBURGER, in this bar, to the right of the username, with the divider that came with it. It was the last item of the SECOND bar - the bar whose contents are moving into the sidebar it opens. On a board it toggles the board's own sidebar; on every other page the shared one. Two guards had to be corrected, and both were wrong before this change rather than because of it. The theme-accent guard derived each theme's accent by matching `.board-color-X#header`, which also matches `#header-quick-access`, so for clearblue it had recorded the quick-access shade (#2d8ce7) as the accent instead of the main bar's (#00aecc); it matches `#header` exactly now. And the new guard first checked that the two bars share a selector LIST, which is a spelling rather than the property - it compares the colours they resolve to. What is NOT in this commit: emptying each page's second header bar into a right sidebar. That is thirteen templates and a shared page sidebar for the pages that have none, and it is the next step. Thanks to xet7 ! |
||
|
|
2f0445102b |
Remove the "100%" zoom feature from the header.
It scaled the board with a CSS transform, it did not work, and there is no plan to
fix it - WeKan already has a font-size setting (Member Settings / Change Font),
which is what the control was reached for anyway. A control that does nothing is
worse than no control, so it is gone rather than hidden.
What went with it: the pill and its number in the header, the helper and the three
handlers behind it, Utils.getZoomLevel / setZoomLevel / applyZoomLevel and their
three call sites, the `profile.zoomLevel` schema field, its entry in the published
user fields, the model setter and the server method, the `click-to-change-zoom`
translation string, and 57 stylesheet rules spread over four files - header.css,
layouts.css, boardHeader.css and boardsList.css - which is how much of the
stylesheet a broken feature had accumulated.
The card zoom is a DIFFERENT feature and is untouched: getCardZoom / setCardZoom /
applyCardZoom and the +/- buttons in the card header still work.
Three tests existed only to constrain the pill, and each is handled on its own
terms rather than deleted to make the run green:
* uiDensity's "zoom pill fits inside the 28px quick-access row" has nothing left
to measure; it is replaced by a guard that the pill has not come back into any
of the four stylesheets that carried it - it was spread widely enough that a
partial revival is a real risk.
* mobileAllBoardsFit's "the quick-access bar gives way" capped the zoom input at
50px of a 375px phone. The rest of that test - notifications and the user bar
never shrink, because they are what the user came for - is untouched, and the
zoom half is now the same "it has not come back" assertion.
* mobileAllBoardsFit's "the zoom number stays INSIDE its white pill" was a real
bug once (the pill shrank below its contents and the number ended up beside it
in 8px type under the notification bell). There is nothing left to lay out, so
it is removed with a note saying what it used to protect and where the
replacement guard is.
Thanks to xet7 !
|
||
|
|
0c9b7b7fa8 |
Fix popup spacing, aligned description columns, and board bar centering.
Every popup had 10px of empty space above its content that nothing in
popup.css asked for: peopleBody.css and translationBody.css each carried a
bare `.content-wrapper { margin-top: 10px }`, and `.content-wrapper` is not a
settings class - the only element in WeKan with that class is the scrolling
body of a popup. Removed, and the remaining gap is now 6px under the header
plus 12px of content padding = 18px, exactly the 18px beside the first row.
Change Visibility and Change Watch lay their rows out as three left-aligned
columns, so the icons, the names and the descriptions line up and the check
mark of the active row can no longer push its description out of line.
And the second header bar centers its items: symmetric block padding instead
of 7px above and none below, no top margin on the button groups, and a title
that centers on its own text - which is what made the board title sit high.
The sidebar hamburger has equal side margins, so it sits in the middle of the
space between its divider and the end of the bar.
Thanks to xet7 !
|
||
|
|
e2c6f04a23 |
The board bar's icons fit two rows, and a desktop-mode board is a desktop board.
The icons still took four rows - title, seven, three, hamburger - because the
rule that makes each button a flex item of the bar was in boardHeader.css, and
`#header #header-main-bar .board-header-btns-group { display: flex }` in
header.css has the same specificity and loads later. So the groups never became
`display: contents` and the whole set stayed one unbreakable item, which is also
why the hamburger after it got a row to itself. Same lesson as the button
metrics: this pair of files needs the rule in the one that wins.
Lists still stacked in desktop mode, because boardBody.css lays the whole canvas
out for a phone by WIDTH: `display: block` on the swimlane with `overflow-x:
hidden` on the wrapper, which makes every list a full-width row and drops the
"add list" form under the last list rather than beside it. That is mobile mode's
layout now. Desktop mode gets the desktop board on the same narrow window: the
swimlane is a flex ROW that scrolls sideways, so the lists run left to right and
the add-list form is the last item of that row - the right in LTR and the left in
RTL, since a row follows the writing direction rather than a hard-coded side.
tests/narrowWindowLayout.test.cjs pins both, including which file the contents
rule has to live in.
Thanks to xet7 !
|
||
|
|
75b5623274 |
Mobile mode is the phone layout; desktop mode is the desktop layout, on a phone too.
Five things from the same two screenshots, and one theme: what belongs to the MODE the user chose, and what belongs to the width of the window. The board bar's buttons still took three rows in desktop mode. The metrics were written in boardHeader.css, and Meteor loads client/components/boards/ before client/components/main/ - so at equal specificity header.css's `margin: 0 6px` won, and the 2px never applied. They are written in header.css now, with `!important` so `.mobile-mode .board-header-btn` (9px/21px of padding on every one of these buttons) cannot take them back either. 44px target + 2px each side = 48px: seven fit a 375px row, so eleven icons take two rows in both modes. The sidebar hamburger was pinned to the top right corner, beside the title, with the icons below it. It is the LAST button at the right of the last row now: in the flow, with an auto start margin, so it never covers a button and reads as what it is. The user avatar was cut in half in MOBILE mode only. Same cause as the buttons: the drag-handle toggle in the top bar is also a `.board-header-btn`, so mobile mode gave it 42px of padding for one icon - the width the avatar needed. It is sized for what it is now, in both modes. Lists stacked one per row in desktop mode. That layout is chosen by WIDTH (max-width: 800px), so a phone in desktop mode got the phone board: one list per row instead of lists side by side. The stacking rules are `body.mobile-mode` now - the same class the rest of the mobile board layout uses. The minicard's drag handle sat near the bottom of the card in desktop mode. The full-height thumb column is chosen by `pointer: coarse`, which is true of a finger whatever mode the user picked; in desktop mode the compact handle in the corner, under the menu button, is what belongs there. That block is scoped to mobile mode as well. tests/narrowWindowLayout.test.cjs follows all five, including that the button metrics live in the file that wins and that the mode-based rules are mode-based. Thanks to xet7 ! |
||
|
|
88d776e212 |
The avatar lines up with the bell, and "My Boards" is back at the left.
The avatar sat above the bell and against the right edge of the screen. Its wrapper carries `top: -5px` - a leftover from the desktop bar, where the username sits beside it - which lifts it off the row's centre line, and `#header-user-bar` carries 10px of padding on each side, which is 20px of a 375px bar spent on nothing and is what pushed the avatar past the edge. Neither applies on a phone now. The chips I put behind the mode-toggle icons cost width in the same row, so they are trimmed from 6px of side padding to 4px. "My Boards" had moved to the middle of the second header bar, and that was mine: the phone rule that makes the All Boards page a flex column was written for a bare `.wrapper`, and header.jade puts `wrapper` on #header-main-bar on every page that is NOT a board. So the header bar became a flex column too, and the bar's own `align-items: center` then centred its items across it. Scoped to `#content .wrapper`: the page wrapper is inside #content, the header bar is not. (The `height: 100vh` that rule replaced was landing on the bar as well.) tests/narrowWindowLayout.test.cjs pins the avatar's placement and fails on a bare `.wrapper` rule in the phone block; tests/boardListScrollChain.test.cjs follows the scoped selector. Thanks to xet7 ! |
||
|
|
5741ec7c20 |
The board bar reads left to right, and the header says which mode you are in.
Four things from the same two screenshots, all on a phone and all the same in mobile mode and desktop mode, because every rule here is chosen by WIDTH. The board's buttons started on a row of their own under the title. Every group is one flex item - deliberately, so a long title pushes them all down together - but that also means they move as one block even when there is room beside a short title for several of them. On a phone the groups are `display: contents` now, so each button is a flex item of the bar itself: they start immediately to the right of the title and wrap only when the row runs out. The sidebar hamburger sat on a row below the buttons, with the empty band that goes with it. It was already meant to be pinned to the top right corner - by two rules scoped to `body.board-view`. Nothing in this app ever sets that class: it is written in 67 CSS rules and added by no code, so those rules have never applied, in either mode. The width-based copy asks `:has(.board-header-sidebar- toggle)` instead - is the hamburger there - which is the thing the rule actually cares about. (The other 65 dead `body.board-view` selectors are left alone: they are a separate question, and turning that class on would flip every `body:not(.board-view)` rule in the header at the same time.) The mobile/desktop toggle did not say which mode was on. The two icons differed only by colour - #000 for the active one, #666 for the other - which at 14px on a phone is no difference at all. The current mode is now a filled chip in the active theme's accent with a white glyph, and the other side is faded to 0.35. The avatar sat higher than the bell beside it, and its initials sat low in the circle. The first is a 4-6px BOTTOM margin from the mobile blocks, which in a centred row lifts an item by half of it; the bell and the avatar have no block margin now. The second is the initials SVG: `y="11"` of a 15-unit viewBox is 73% down, and font-size 16 in that box is taller than the box - it is `y="50%"`, `dominant-baseline="central"` and font-size 10 now, for the user, organization and team avatars alike. tests/narrowWindowLayout.test.cjs pins all four, including that these rules do not hang off body.board-view. Thanks to xet7 ! |
||
|
|
f6c83495bc |
The bell and the avatar sit the same way in both modes.
They were placed by whatever margin happened to win: one auto margin on the zoom pill pushed the pill, the bell and the avatar to the end of the row as a packed group, so the bell sat against the pill with all the empty space beyond it, and the avatar's distance from the edge was whatever was left over - different in mobile mode and in desktop mode on the same phone. Below 800px - a width, so both modes get it - the free space is shared around the bell instead: an auto margin on EACH side of it puts it midway between the zoom pill and the avatar, and the avatar keeps a fixed 12px gap to the right edge rather than being flung against it. Exactly one auto margin belongs to the bell pair; the user bar's is cleared, since two would split the row and separate them again. Both `.iphone-device` variants are named in the selector list. That fallback sets these margins with `!important` and two classes more than a bare id selector, so without naming them the placement would apply everywhere EXCEPT the phone this was reported from. The cascade was resolved property by property, shorthand `margin` included, rather than assumed. tests/narrowWindowLayout.test.cjs pins the two auto margins, the single fixed gap, and that the iphone-device variants are named. Thanks to xet7 ! |
||
|
|
eb56ea5895 |
A narrow WINDOW gets the narrow-window layout, not only mobile mode.
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 ! |
||
|
|
08f4c80c73 |
The zoom number is inside its white pill again, and big enough to read.
Two things had gone wrong with the zoom control on a phone, both visible in the same screenshot: the white rounded pill was empty, and "100" sat to the right of it in tiny type, half under the notification bell. The pill was allowed to shrink below its own contents (`flex: 0 1 auto` + `min-width: 0`, from the change that made the bar fit the screen). A flex item that shrinks past its content does not clip it - the background box ends where the width says, and the text carries on outside it. So the white area and the number it belongs to were laid out at two different widths. The pill is sized by what is in it now, and what is in it is made small instead: a compact "100%" and a 46px input for when it is clicked to be edited. The tiny type was `font-size: 0.7em` on a bar whose own text is 12px - about 8px, the smallest text on the page, and set with `!important` on selectors specific enough to beat anything written later. That declaration is now a plain 14px, the size of the rest of the bar, which is also why the pill stays narrow: at 14px "100%" needs about 40px. The base rule also caps the pill at `max-height: 24px`, shorter than 14px text with padding, which pushed the number against the top edge; the mobile rules lift that cap and centre it. Every one of these declarations is `!important` because the "Make zoom controls larger" block at this very width sets 21px paddings and margins that way - the cascade was checked selector by selector, not assumed. tests/mobileAllBoardsFit.test.cjs pins it: the pill and the number never shrink below their contents, the cap is lifted, no zoom rule sizes the text as a fraction of an already small bar, and the number is at least 12px. Thanks to xet7 ! |
||
|
|
dea262ef6c |
All Boards on a phone: fit the screen, and give the board titles their width.
Two things from the same screenshot.
The board titles were laid out TWO CHARACTERS per line - "Da" / "ta". The drag
handle is one absolutely-positioned ~26px circle, but the space for it was
reserved three times on the way down: 32px on the `li`, 30px on the tile and
50px on `.details`. On a ~97px phone tile that is more than the whole tile, so
the title was laid out in what was left, about 27px. It is reserved once now,
on the tile, and not at all when the handle is not rendered - with drag handles
off there is nothing there to reserve for, which is the state the screenshot was
taken in. The `.mobile-view` tiles already had this fix; the plain ones, which
is what a phone gets when the list is not in mini-screen mode, did not.
The page could also be dragged sideways: the avatar sat past the right edge and
the board list moved with the page when you did. On a small screen the
quick-access bar is `flex-wrap: nowrap` with `overflow: visible` - deliberately,
so an item that does not fit spills rather than disappears - and every item
declares `flex-shrink: 0 !important`. Nothing could give way, so the row was
wider than the screen, and a visible overflow is scrollable overflow. The widest
item by far was the zoom pill: an 80px fixed input plus padding took ~113px of a
375px bar, more than the home icon, the mode toggle and the bell together. "100"
fits in about half of that, and the pill may now shrink; the bell and the avatar
never shrink, being what the user came for. `html { overflow-x: hidden }` on a
small screen is the guarantee that a future item, a long translation or a custom
logo cannot bring the sideways scroll back.
tests/mobileAllBoardsFit.test.cjs pins both: the handle width is reserved once
and dropped entirely when there is no handle, and the bar's widest item can give
way while the page cannot scroll sideways.
Thanks to xet7 !
|
||
|
|
a5850296ad |
Mobile mode: the board fits the width, and the titles sit on their centre line.
The lists area was a little too wide - a horizontal scrollbar with a small amount to
scroll right and nothing there to see. Two causes.
`100vw` again. It was fixed in boardHeader.css in
|
||
|
|
d03cd03007 |
Stop elements resizing with the browser window, this time inside clamp().
Reported on a board in mobile mode in desktop Firefox: widening the window made the
swimlanes, lists and cards taller; narrowing it shrank them again. The same complaint
as /sign-in and /sign-up, and the same cause - a size measured against the WINDOW
instead of being a size.
The earlier sweep converted 355 bare `vh`/`vw` values but explicitly ALLOWED
`min()`, `max()` and `clamp()`, on the grounds that they are caps. `clamp()` is not.
It is only a cap at its two ends; between them it tracks the viewport exactly like a
bare `vw`. So `font-size: clamp(18px, 2.5vw, 32px)` on a swimlane header, a list
header and a minicard is a font that grows with the window - and since those rows are
sized by their text, the rows grow with it. There were 75 of these across 17
stylesheets, 36 of them in the mobile-mode board rules.
All 75 are converted to the size they already rendered at on a phone - the lower bound
of each clamp. That is the value these rules were designed around (below ~800px the
clamp was pinned to it anyway), it is in line with the rest of the UI's fixed sizes,
and picking the upper bound instead would have made every phone bigger than it is
today.
Also converted, same behaviour by other spellings:
* `.board-sidebar { width: clamp(320px, 30vw, 560px) }` -> a fixed 420px. Its own
comment recorded 420px as the intended width; the clamp was added to stop a bare
30vw doubling on wide screens, but it still resized in between.
* `min-height: 3vh` on the mobile minicard -> 24px.
* `min-height: 60vh` on a collapsed list -> 540px, which is exactly what the
`height: 540px` on the very next line already says.
* `min-height: 60vh` (settings body) -> 540px; `min-height: 14vh` (search popover)
-> 126px.
* `max-width: 13vw` on a minicard custom-field chip -> 160px.
tests/noViewportSpacing.test.cjs no longer allows clamp() or a viewport `min-*`, and
says why. What stays allowed is a full-viewport box (100vh/100vw), a `max-height` /
`max-width` cap, and `min(400px, 52vw)` - a shrink-only cap, flat at the px above the
crossover width and giving way only below it so a box fits a narrow screen. It never
grows with the window, so it is not this bug; `max(...)`, which does grow without
bound, is not allowed. Both argument orders are accepted.
tests/sidebarWidth.test.cjs required `clamp()` for the sidebar - that was the fix for
the doubling, and it is now the thing being removed. It asks for a fixed px width and
no viewport unit at all, which is a stronger form of what it was guarding.
Tests: 1321 passing.
Thanks to xet7 !
|
||
|
|
72315d8f96 |
Mobile mode: same bar on a phone as on a desktop, list title back, board reflows.
Reported with two screenshots of the same app: on an iPhone 12 mini the second header
bar held a handful of icons and no board title, while a desktop Firefox window in
mobile mode showed the title and the full set of buttons. Same mode, two bars.
Mobile layout is driven from three switches that did not agree: `body.mobile-mode`
(the toggle), `Utils.isMiniScreen()` (which template branch renders) and
`@media (max-width: 800px)` (the viewport - true on a phone, false on a wide desktop
window even with mobile mode on). The first two were made to agree in a5246fbf5; the
rules that assumed the third are fixed here.
`.mobile-mode .board-header-btns.left { display: none }` is removed. The left group
holds edit title / visibility / watch / star / sort, and boardHeader.jade renders them
in EXACTLY ONE of the two groups - left `unless isMiniScreen`, right `if isMiniScreen`.
So in mobile mode the left group is already empty and hiding it changes nothing,
EXCEPT when the switches disagree, and then it deletes those five buttons from the bar
with no replacement. Gone, so that if the switches ever drift again the buttons survive
instead of vanishing.
The phone block gave the bar a fixed `height: 48px` for #6419's touch targets. A fixed
height CLIPS the second row the bar wraps to when title + buttons do not fit on one -
part of the bar was simply not there. Now `min-height`, so the targets keep their size
and the bar can grow; it still sits on one row whenever the content fits, which is the
normal case.
The list title is visible in mobile mode again, on both. listHeader.jade has two
shapes: on a mini screen the `h2.list-header-name` is a direct child of `.list-header`,
otherwise it is wrapped in a div (the one that rotates when a list is collapsed).
Mobile mode lays the header out as a grid and places the title by grid row/column,
which only applies to a direct grid ITEM - inside the wrapper the placement was ignored
and the title landed in the 30px first column, squeezed to nothing. `display: contents`
drops the wrapper from the layout so the title is a grid item in both shapes. Not for
`.list-rotated`, which needs a real box to rotate, nor for the screen-reader move
buttons.
The board reflows sideways again instead of overflowing by a sliver. The mobile board
rules sized the canvas, swimlanes, lists and list headers with `100vw` - the viewport
width INCLUDING the vertical scrollbar. The canvas scrolls vertically, so every one of
those was about a scrollbar's width wider than the box it sat in, at each nesting
level, and `min-width` pinned to the same value meant it could not shrink. All 18 are
now `100%`, which resolves against the parent's content box and already excludes the
scrollbar.
Tests: 1321 passing.
Thanks to xet7 !
|
||
|
|
a5246fbf57 |
Mobile mode: drag-scroll the header bars, hamburger in the corner, full-width lists.
Four things reported while using mobile mode, three of them in the second header
bar.
Drag-to-scroll now works on BOTH top header bars, not only below them. Everywhere
else a drag scrolls - `.board-canvas.dragscroll` on a board, `<body>` / `#content`
on the whole-page layouts - but the two header bars were dead, and on a phone they
are a large share of what is on screen. They cannot simply be tagged `.dragscroll`:
that class scrolls the element carrying it, and neither bar is a scroll container -
`#header` sits outside `#content` and outside the board canvas. So a new module,
client/lib/headerDragscroll.js, forwards the drag to whatever actually scrolls: a
scroller inside the header first (the starred-boards list is overflow-x:auto), then
the board canvas, then the page scroller. Both bars are `.nodragscroll` so the
page-level dragscroll does not scroll a second time from the same gesture. Mouse and
touch are both handled - a phone sends no mouse events, and the dragscroll library is
mouse-only and element-bound. A tap is still a tap: scrolling starts only past a 4px
threshold, and only then is the click that ends the gesture swallowed, in the capture
phase, so dragging across the bar does not press whatever you let go over.
The second header bar on a phone now reads title, buttons, hamburger. The board title
is shown again - it was hidden by a `display: none !important` that predates this
work, which left the bar with nothing but icons, so you could not tell which board you
were on. A board name is how you know where you are, so it wraps rather than
truncating. The buttons start at the right of the title and drop to a second row as a
block when the space between the title and the menu button runs out; they are one flex
item, so they never split across the two rows.
The sidebar hamburger, with its divider to its left, is pinned in the TOP RIGHT
corner. It was lifted out of the `.right` group into its own flex item placed after
the title, because inside that group it could only ever wrap down together with the
other buttons - a flex line breaks in order. On a phone it is taken out of the flow
(position:absolute) and the bar reserves its width as end padding, so a long title or
a full row of buttons never runs underneath it; that reservation is board-only, since
the same bar on All Boards has no hamburger. On a wide screen `order: 1` puts it back
at the end of the bar, visually identical to before.
Lists and cards are full width in mobile mode on a DESKTOP browser too, not only on a
phone. Two causes, both from mobile mode being decided in two places that disagreed:
* Utils.isMiniScreen(), which drives the `mobile-view` class on each list, swimlane
and minicard, looked only at screen width and user agent. The explicit toggle was
honoured on iPhone only - and even there through a test that could never be false,
since getMobileMode() falls back to viewport detection and so always returns a
boolean. An explicit choice now wins on every device, via a new
getExplicitMobileMode() that can answer "never chosen"; the per-device branches
below it are the defaults for that case.
* `.mobile-mode .list { width: 100% !important }` was outranked by
`.js-swimlane .list[style*="--list-width"] { width: var(--list-width) !important }`
- both !important, and the second more specific. It never showed on a phone (no
inline --list-width is emitted there), only in mobile mode on a desktop window.
The override repeats those three selectors prefixed with body.mobile-mode, and
keeps the :not(.list-collapsed) exclusion so a collapsed list stays 30px (#5892).
Also adds tests/jadeCompiles.test.cjs, which compiles every .jade with the SAME
compiler the build uses. Nothing else caught a broken template: the other suites read
.jade as text and grep it, so a file the compiler rejects still passes them all. It
was written after a `<body>` inside an indented `//-` comment block broke the build
here - the comment text is still lexed, so the angle brackets opened a tag that never
closed. All 107 templates parse in ~0.2s.
tests/headerHamburger.test.cjs asserted the hamburger sits inside the `.right` group,
which is exactly what moved; it now checks the new wrapper, its divider, and that
`order` still puts it last on a wide screen.
Tests: 1309 passing.
Thanks to xet7 !
|
||
|
|
40de0df00f |
Stop element size and spacing changing when the browser window is resized.
Reported on /sign-in and /sign-up: making the window taller made every element
taller and every gap wider; making it shorter shrank them. That is what vh does -
`padding: 3vh 3vw`, `margin-top: 6vh`, `min-height: 4.5vh` - the box is a
percentage of the WINDOW, so the page reflows continuously as you drag the edge
and the same layout looks different on every screen.
It was not only those two pages. 355 such values across 24 stylesheets, on
padding, margin, gap, height, line-height, font-size, border-radius and
box-shadow. They are now the pixel sizes they rendered at on the window they were
tuned for (1vh -> 9px, 1vw -> 14px), so each page looks as it did at that size and
stays that size everywhere else.
Two of them were documented bugs already: minicard.css carries two comments
explaining that the global `.viewer { min-height: 2.5vh }` "reserves a big empty
band under a one-line title, so half of every minicard was white space" on tall
screens. That floor is 22px now, and the modal body's 20vh is 180px.
Viewport units are still right for three things and are kept: a full-viewport box
(100vh/100vw), a CAP that stops content overflowing a small screen (min(), max(),
clamp()), and max-/min-width limits. 274 such uses remain, all deliberate.
The conversion was a token substitution - it cannot move or delete a rule - and
brace balance was asserted unchanged for every file before writing it.
Tests: tests/noViewportSpacing.test.cjs scans every stylesheet under client/ and
fails on any size or spacing measured in vh/vw, while still permitting the three
legitimate shapes (it checks both directions). It blanks block comments first, so
the two minicard.css comments ABOUT this bug are not reported as uses of it. One
existing test pinned the literal `2.5vh` global floor; it now pins a px floor, and
the dependency it documents - that the minicard override compensates for a global
floor - is unchanged.
Thanks to xet7 !
|
||
|
|
9df568c0c2 |
Board bar: a long board title moves ALL the buttons to the second row.
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 ! |
||
|
|
f75b28cc81 |
Board bar on iPad: fit the second header bar on one line.
On iPad landscape the board bar wrapped onto two rows: board title, edit, visibility, watch, star and sort on the first, Filter / Search / view / dependencies / multi-selection / hamburger on the second. Measured from the report at a 1180 CSS px viewport, the two rows needed ~613px + ~691px = ~1304px on one line, about 124px more than the viewport. Nearly all of that is per-button CHROME rather than text: every .board-header-btn carries 12px side margins (24px), its icon another 10px per side (20px) and a 10px gap after the label - roughly 54px of empty space around a ~60px icon+label. So nothing has to be hidden at this width; halving the chrome between 801px and 1400px frees ~295px, which fits the bar on one line at 1180px with room to spare for languages whose labels are longer than the Finnish ones. Only empty space shrinks - icon and label sizes are untouched, so the buttons stay comfortable to tap. Tablet PORTRAIT (iPad 820px) cannot fit ~1009px of icons+labels even halved, so between 801px and 1000px the labels drop to icons only, the same treatment the phone block already gives below 801px. Titles, tooltips and popups are unchanged, so nothing becomes unreachable. Bounded at 1400px so wide desktops, which never wrapped, look exactly as before; 1400px still covers iPad Pro 12.9" landscape (1366px), and phones at 800px and below keep their existing 44px touch targets. Tests: tests/boardHeaderOneLine.test.cjs guards the arithmetic, not just the presence of the rules - it reads the base and override margins out of header.css and asserts the halving frees more than the measured 124px deficit (with 2x slack for longer translations), that button rules in the tablet block change only margins so the #6419 touch sizing cannot be shrunk back, that the phone block is untouched, that the overrides come after the base rules they override (a media query adds no specificity, so source order decides), and that every control on the bar is a .board-header-btn so the rules actually reach it. Thanks to xet7 ! |
||
|
|
940437865d |
Top bar: keep the zoom/bell/avatar group at the end (LTR right, RTL left).
The zoom %, notification bell and user/avatar menu are the last items in the quick-access bar. When the starred-boards list in the middle is shown it fills the gap with `flex: 1` and pushes them to the end - but that list is `display: none` on a phone, so with nothing filling the middle the group bunched at the START (left in LTR) with empty bar to its right. `margin-inline-start: auto` on the first item of the group (the zoom control) pushes the whole group to the end. Being a LOGICAL margin it is the right edge in LTR and the left edge in RTL automatically, which is the requested behaviour. An auto margin an earlier small-width rule had put on the user bar is cleared, so there is exactly ONE auto in the row - two would split the free space and separate the group. The rule is last in the file, so it wins on source order. Thanks to xet7 ! |
||
|
|
fff4951274 |
Keep the avatar on the first row: stop forcing the bar to wrap, and hide the username.
The avatar dropped to a second line even with space left beside the bell, because a width-based rule forced `flex-wrap: wrap !important` on the quick-access bar - added deliberately, with the comment "so ~7 items fit in two wrapped rows". An !important wrap beats any nowrap, so the earlier one-row work never took effect at small width; and a wrapping flex row breaks BEFORE the last item rather than shrinking anything, which is why the avatar went down while empty space stayed behind on row one. Every flex-wrap rule on that bar is now nowrap (verified by listing all eight), and the items are made to fit rather than the row made to grow. `overflow: visible` is kept, so a long translation or a custom logo spills instead of disappearing. The username/full name beside the avatar is also hidden at small width, as reported. The template already hides it `unless isMiniScreen`, but that is a JS/Session decision - Utils.isMiniScreen() also weighs mobile mode and the device - so it can be true while the bar is narrow, and a full name is easily 100px+ of a 375px bar. Same bare-text-node situation as the home link: font-size:0 on the link collapses the name, and the avatar keeps its own size (with a font-size restored on the avatar wrapper so initials avatars, which have no size of their own, do not vanish with it). The name stays in the DOM for screen readers. Measured budget for an iPhone 12 mini is now 328px of 375px. Thanks to xet7 ! |
||
|
|
76516a1a29 |
Actually hide "All Boards" on small screens, and trim the bell's margins.
The label was still visible on iPhone and Fairphone 4. The rule that was supposed to hide it (added in the one-row commit) carried no !important, and ELEVEN other rules in header.css set a font-size on that same link - most of them !important, including three scoped to the All Boards page itself via `body:not(.board-view)` / `.wrapper ~`, and one setting `16px !important; /* Much larger text */`. Every one of them beat it, so the label kept showing on exactly the page it was reported on. The fix is a block at the END of header.css that uses !important and repeats each competing selector shape (plain, `.wrapper ~`, `body:not(.board-view)`, and the three `.iphone-device` variants), so where specificity ties, source order decides in favour of hiding. Enumerating every font-size rule that touches `.home-icon a` confirms this one is last: the competing !important rules end at char 36958 and this one is at 47542. Keyed on WIDTH (max-width: 800px), which is what was asked for - all smartphones, small width. The viewport meta is `width=device-width`, so an iPhone 12 mini reports 375px and a Fairphone 4 about 360px; both match. The separate `body.mobile-mode` rule still covers the explicit phone/desktop toggle at any width. Also trims the notification bell, which sat in 36px of margin around a 28px icon: 10px on each side of the button (notifications.css) plus 0.5rem on each side of its `#notifications` wrapper from the mobile blocks. More empty space than icon, and on a 375px bar it is space the other buttons need. Both layers now give 2px a side, which takes the measured one-row budget from 342px to 320px of 375px. Thanks to xet7 ! |
||
|
|
b9f178ef55 |
Hide the "All Boards" label next to the home icon in mobile mode.
The previous commit hid it on a narrow VIEWPORT (a media query) and on `.iphone-device`. Mobile MODE is a different thing: `body.mobile-mode` is set by Utils.applyMobileMode() from the phone/desktop toggle in this same bar, it is a deliberate user choice, and it applies at any width - so on a wide screen in mobile mode the label was still there. That is what was asked for: mobile mode, not a viewport width. `body.mobile-mode #header-quick-access .home-icon a` (1,2,2) beats the base `#header-quick-access .home-icon a` (1,1,1), so no !important is needed for this path; the `.iphone-device` path already has its own override, appended after the two competing `font-size: 1em !important` rules so the later one wins. The label is a bare text node inside the link, not a span, so it cannot be selected on its own: font-size:0 on the link collapses it and the icon's own font-size brings the icon back. The text stays in the DOM, so screen readers and the accessibility tree still announce "All Boards". Thanks to xet7 ! |
||
|
|
21be1e57ba |
Fit the quick-access top bar on one row on phones.
On an iPhone 12 mini (375px) the bar wrapped to two rows: home + logo +
mobile/desktop toggle on the first, drag-handle toggle + zoom + notifications +
user menu on the second. The mobile CSS chose that on purpose - the comment said
a nowrap row overflowed and `overflow: hidden` clipped the right-hand items - but
it treated the symptom. The row did not fit because of what was IN it:
* the home link kept its full "All Boards" label, the single widest item in the
bar and longer still in most languages ("Kaikki taulut");
* the logo was allowed 120px of a 375px bar;
* TWO items had `margin-inline-start: auto` (zoom and the user bar). An auto
margin absorbs all remaining space on its line, so the first one filled row 1
and pushed everything after it onto row 2 - that alone forced the wrap;
* items carried 8px gaps and, on the `.iphone-device` path, 0.5rem margins on
BOTH sides: ~80px of margins across five items.
The row now fits instead of wrapping: the home link is icon-only, the logo caps
at 84x20, there is exactly ONE auto margin (on the user bar, so it still sits at
the end when there is room), gaps are 6px and per-item margins 3px. Measured
against the declared sizes that is 342px of 375px, leaving ~33px of headroom.
The home LABEL is a bare text node, not a span, so it cannot be selected
directly: `font-size: 0` on the link collapses it and the icon's own font-size
brings the icon back. The text stays in the DOM, so screen readers still announce
it.
Both paths had to change together. `.iphone-device` is added by boardBody.js, so
it is present on a board page and ABSENT on All Boards (the screen in the report),
and its rules set font-size and per-item margins with !important - without the
matching override the bar would have stayed two rows on a board page and changed
height when navigating between the two screens.
Thanks to xet7 !
|
||
|
|
834698bb5e |
Revert board-header icons-only; update CHANGELOG Upcoming with newest changes.
- Revert the unconditional hiding of board-header button text labels (Private, Muted, Sort, Filter, ...): they show again at normal widths. The pre-existing mobile-only (max-width:800px, #6419) icons-only rule is untouched. - CHANGELOG Upcoming: add consolidated entries for the recent All Boards / board-header layout polish, the Change Color swatches / immediate-apply / applies-everywhere / popup title, the #4759 user-insert validator fix, and the rebuild-wekan.sh CURRENT-IP fix; mark the #2220 home-board toggle as currently disabled. |
||
|
|
97b0240ca4 |
Board header: icons only — always hide button text labels.
Make the board-header button text labels (Private, Muted, Sort, Filter, Swimlanes, Multi-Selection, ...) always hidden (was only under a max-width media query), so the header shows icons only. The board title and the star count (.board-star-counter) are not button labels and stay. Guarded in tests/headerHamburger.test.cjs. |
||
|
|
68723ff43b |
Board header: remove the Board Settings cog (it is already in the right sidebar).
The #6465 one-click board-settings cog (js-open-board-menu) sat just left of the sidebar hamburger, duplicating Board Settings which is reachable from the right sidebar. Remove the cog from boardHeader.jade, its now-dead click handler from boardHeader.js, and the unused .js-open-board-menu header CSS rule. The sidebar board-menu button (sidebar.jade/js) is unchanged, and the hamburger + separator remain. Guarded in tests/headerHamburger.test.cjs. |
||
|
|
cfd53cc969 |
Board header: hide button text labels on narrow windows (icons only).
When the window is not wide enough, the 2nd header bar button labels (Private, Muted, Sort, Multi-Selection, ...) wrapped to a second row. Add a max-width: 1200px media query that hides the .board-header-btn text spans (show icons only), keeping the board title and the buttons on one line. The star count (.board-star-counter) is kept. Guarded in tests/headerHamburger.test.cjs. |
||
|
|
bd72f5d64c |
Board header: hamburger right gap matches the user-name gap (~8px).
Previously the sidebar hamburger sat 12px from the right edge (2px margin + 10px bar right padding), more than the ~8px gap to the right of the user name in the top bar (.header-user-bar-name margin-inline-end: 8px). Remove the board header bar right padding and give the hamburger margin-inline-end: 8px, so its right-edge gap is the same small amount as the user name. Guarded in tests/headerHamburger.test.cjs. |
||
|
|
e33e50d9c8 |
Board header: remove empty space around the sidebar hamburger button.
The hamburger used the general .board-header-btn margin: 0 12px, leaving a button-sized empty gap on each side. Tighten its side margins to 2px (and the preceding cog button right margin to 2px) so the hamburger sits snugly at the right edge with no wasted space to its left or right. Guarded in tests/headerHamburger.test.cjs. |
||
|
|
7718118654 |
Board header: keep the sidebar hamburger pinned to the right edge at all widths.
The board header bar (Swimlanes + Lists views) used a float layout: the right button group (which ends with the js-toggle-sidebar hamburger) was float: inline-end. As the window width changed, the floated groups wrapped and the hamburger drifted to the middle of the bar. Make #header-main-bar a flex row (align-items:center, flex-wrap:wrap), make the button groups flex (their buttons float is ignored inside a flex container), and pin the right group with margin-inline-start:auto so it always hugs the right edge (or the right of its row when wrapped). Guarded by tests/headerHamburger.test.cjs. |