mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
12ae908ddfbcaa0bf59d7c5dc047ea77757bb264
111
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
12ae908ddf |
Release: build every Linux platform FerretDB does, with a Node.js to match.
Every non-amd64, non-arm64 platform already used FerretDB v1 - MongoDB ships no server for any of them - but only three of them were built, because only three had a Node.js runtime anyone published. wekan/node now builds the rest, so the gap is gone and the release follows FerretDB's list. New bundles: i386, armhf and loong64, beside the ppc64le, s390x and riscv64 already there. They go into the snap (i386 and armhf; loong64 is not a snap architecture) and into the multi-arch image (linux/386 and linux/arm/v7; buildx and the three registries do not agree on loong64 yet). WHERE THE NODE.JS COMES FROM is now resolved at build time rather than declared: nodejs.org, then unofficial-builds, then the wekan/node fork, in that order, and the log says which one served. The first two ship a tarball; the fork ships the bare binary it built, because that is the only part missing - so when the fork serves, npm comes from the official amd64 tarball of the same version. npm is JavaScript and runs on whatever node executes it, so an npm built for one CPU drives a node built for another. THREE VOCABULARIES meet in this matrix and they disagree: Node says x86 and armv7l where Debian, snap and FerretDB say i386 and armhf, and snap says ppc64el where everyone else says ppc64le. Each row now names all three - arch, node_arch and ferretdb_arch - because a row that named one of them would download another CPU's binary and nothing would notice until somebody ran it. The MongoDB Database Tools are per-tool tolerant now: wekan/mongo-tools does not publish every arch, and a missing mongodump is a missing convenience rather than a broken bundle - FerretDB is the database. It removes the inherited amd64 one instead of shipping it, because a tool for the wrong CPU is worse than no tool. armel is the one FerretDB target left out, and deliberately: V8 has not supported ARMv5 for many years, so there is no runtime to put in the bundle and the fork cannot build one either. A new guard reads the four lists that have to agree - the bundle matrix, the snap platforms block and its arch mapping, the snap-launchpad matrix and the Docker platform list - and checks every snap arch has a bundle behind it, every bundle row names all three vocabularies, and buildx builds exactly the platforms whose push is then verified. Two older guards pinned the five-platform snap list and now pin the seven. Written up in docs/Design/Autoupdate/Platforms.md. Not verified by a real release run: no workflow here can be executed, and the first run is what will say whether the loongarch64 cross toolchain is available on the runner and whether each platform's Node.js resolves where expected. Thanks to xet7 ! |
||
|
|
73a136bedd |
Workspaces nest: drop into one to make it a sub-workspace, and fold the tree.
A workspace held boards and, in the data, other workspaces - but a drag could
only ever say one thing about them, and the fold was not there at all.
WHERE IN A ROW it is dropped is now what the drop MEANS:
the top quarter - it becomes that row's previous sibling
the bottom quarter - it becomes that row's next sibling
the middle half - it becomes that row's LAST CHILD, a sub-workspace
The middle is the biggest target on purpose: reordering can also be reached by
aiming at the neighbouring row's far edge, but nesting has only this one. Coming
back up is a drop like any other - a child dragged onto a root row's edge is a
root again - because nesting has to be undoable or a workspace put one level too
deep is stuck there.
THE PLACEHOLDER IS A SLOT, NOT A LINE. While the pointer is over a row an empty
slot a row high opens above it, below it, or - for "into this one" - INDENTED
underneath it, which is exactly where the workspace will appear. A line between
two rows is a target that has to be aimed at; a slot is a place to drop into.
The slot is a pseudo-element of the row, so the rows below shift down and the
row being aimed at stays where the pointer put it.
A workspace may not be dropped into itself or into its own descendant: the
subtree would be cut off from the root, taking every workspace under it. It is
refused by NOT calling preventDefault(), which is how HTML5 drag and drop says
no, so the cursor refuses while the workspace is still in the air rather than
the drop landing and quietly doing nothing.
AND THE DROP THAT DID NOTHING. With the handles off the drag starts on an
ANCHOR, and a browser puts that anchor's own text into text/plain. The drop read
text/plain first and took the workspace for a BOARD, so it assigned nothing and
the row snapped back - which is why the same drop worked with handles on, where
the drag starts from a span that carries no text. The drag clearData()s before
setting its own type, and the drop decides on the workspace id FIRST.
A CARET FOLDS a workspace's own workspaces away, at the start of the row -
before the drag handle, so the carets of a tree line up whatever the handles
toggle says. It is the control a list has on a board and the one the left menu
itself has, down to the two words in its tooltip, and it answers Enter and Space
because a tree that only opens with a mouse is a tree half the readers cannot
open. A workspace with nothing under it keeps a spacer of the same width, so a
row does not shift sideways the moment it gains its first child.
Open is the default and only the FOLDED ones are stored: a missing key is an
open workspace, so fifty workspaces with two folded is two keys. Remembered in
the same three layers as the rest of this menu - a Session value, then
profile.collapsedWorkspaces, then a cookie for a reader who is not signed in.
The server method takes the id into a DOTTED FIELD PATH and the tree is written
by the client, so the id is checked against ^[A-Za-z0-9_-]{1,64}$ first: one
carrying a `.` or a `$` would address a different field.
The depth is UNLIMITED because nothing counts it: the template draws itself for
a workspace's children, each level indenting by one caret's width with a logical
property, so a right-to-left tree indents from the right by itself.
What a drag does to the tree is a pure module with its own tests -
dropPosition() and moveWorkspace(), the guards included - so the rules can be
proved without a browser, and the page is pinned to calling them rather than
re-deriving them.
Thanks to xet7 !
|
||
|
|
b50ccc63a8 |
The selected workspace shows its board count again.
The count was there, at the right of the ⋯ menu where it belongs, and it was invisible. The accent fills `.js-select-space` - the icon and the name - and NOT the whole row: the menu button and the count sit after it, on the panel's own light grey. A rule gave the count a white pill with white text "for contrast against the filled row", but the count is not on the filled row, so it was white on light grey. The selected workspace was the one row whose board count could not be read, and it is the row you have just asked which boards are in. The rule is gone rather than re-tinted: there is no accent behind the count to contrast with, so it keeps the same grey pill every other row has. While here, the count and the menu button are `flex: 0 0 auto` on the desktop rules too. The name's anchor is `flex: 1`, so without it a long workspace name shrinks its two neighbours instead of ellipsing itself - which pushes the count off the row that is supposed to be showing it. The phone rules had said this already; the desktop ones had not. The guard in archivePage.test.cjs pinned the white pill as the correct answer, which is how this survived. It pins the opposite now, and says why. Thanks to xet7 ! |
||
|
|
61bfcc0522 |
Without drag handles, a workspace is reordered from its icon and name.
With the handles turned off the drag source was the workspace's ICON alone, and
in practice reordering only worked with the handles on, from the handle.
Two reasons, and the second is why it did nothing rather than being merely
awkward:
* a 16px glyph is a target that has to be aimed at, and the name beside it is
the part of the row a reader is actually pointing at;
* the anchor is not opted out of the page-level dragscroll, which takes the
mousedown, so the drag never begins - and a drag that never begins is
exactly what "reordering does not work" looks like.
The whole icon-and-name anchor is the drag source now, with `nodragscroll` on it
like the handle has, and `user-select: none` while it is the drag source: the
name is TEXT, and a press-and-move over selectable text starts a SELECTION,
which the browser then owns instead of starting an element drag. The handle
never needed that because a glyph in a span is not text anybody selects.
Clicking that same anchor still opens the workspace - a click and a drag are two
gestures on one element, as they are on a board tile with handles off - and the
cursor stays `pointer` rather than becoming `grab`, because opening it is what a
reader does with the row nearly every time.
Still NOT the whole row: it also holds the ⋯ menu and the board count, and a
drag started on those is a drag of something else. draggable lives on the handle
or on the anchor, and the dragstart handler stays on the row, which works
because the event bubbles up from whichever child started it.
Thanks to xet7 !
|
||
|
|
c7bf2958a3 |
A workspace row obeys the drag-handles toggle, and its icon drags without one.
The workspace rows in the All Boards left menu drew a ✥ handle whatever the "Show desktop drag handles" toggle in the first header bar said, and the handle was decoration: the whole ROW carried draggable="true", so the drag started anywhere on it. A row that is draggable as a whole starts a drag on the way to a click, and a workspace row is a row you click - it is how a workspace is opened. The handle follows the toggle now, through the same isTouchScreenOrShowDesktopDragHandles helper the board tiles beside it use, so the two cannot drift apart. With handles ON the handle is drawn and it is the only place a workspace drag may start. With handles OFF there is no handle and the workspace's own ICON is what reorders it - the icon rather than the row, so the name beside it stays a plain click target. draggable lives on the handle or on the icon, never on the row. The dragstart handler stays on the row, which works because dragstart bubbles up from whichever child started it, so the reordering itself is untouched. The grab cursor follows the same `draggable` attribute - `[draggable="true"]` in the selector - rather than a second class, so there is one answer to "is this the drag source right now" instead of two that can disagree. Thanks to xet7 ! |
||
|
|
cdb6113401 |
Archive opens the section of All Boards, not the full-width page.
Member Settings / Archive sent the reader to /archive - the full-width page -
and Boards in Archive is a SECTION of All Boards now: a row in its left menu,
drawn beside it like Starred and Remaining. The page is the thing that section
replaced. Landing on it meant the same list of boards with no menu beside it, no
way across to another section without going back first, and the menu row that
says "Archive" was not the row you had arrived at. A menu entry should land you
on the same Archive the menu itself offers.
All FOUR entry points are the same line in a different menu - the board menu,
the member menu, the board sidebar and the All Boards sidebar - so all four go
to /allboards/archive now, built with allBoardsPath(SECTION_ARCHIVE, []) rather
than by spelling the path out in four places that can drift apart. The member
menu also closes itself behind the click, like every other entry in it that
navigates.
/archive is still a route and still renders, so a bookmark from before does not
break; nothing in the UI points at it any more.
The guard pinned FlowRouter.go('archive') in all four files. The behaviour
deliberately changed, so the guard follows it and says why - and it now checks
that the helper really produces /allboards/archive rather than trusting the
call.
Thanks to xet7 !
|
||
|
|
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 !
|
||
|
|
920d42b6db |
The left menu is resized by dragging its inner edge.
The menu's inner edge - the right one while reading left to right, the left one under a right-to-left language - now carries a grip, and dragging it changes the width. It is the same control the right board sidebar has on its own inner edge: the same 6px strip, the same col-resize cursor, the same nodragscroll so a drag resizes the menu instead of panning the page behind it, and the same sign flip on the delta so the widening drag mirrors under RTL rather than needing a second rule kept in step. ONE number, on <html>. The width is a CSS custom property, --wekan-left-menu-width, and everything that needs it reads that: the Admin Panel's menu, the All Boards one - whose grid track is auto, so the track follows the menu - and the grip itself, which sits at calc(width - 3px) from the row's inline start. An inline width on one element could not have done that: the menu is a different element in a different template on each page. The default is the number in the stylesheet, and a breakpoint that wants a different default overrides the VARIABLE, never the menu's width - a rule naming .side-menu would beat a dragged width, which arrives as an inline property on <html>, at exactly that one screen size. For the same reason the client REMOVES the property when nobody has dragged it rather than writing the default into it. The Admin Panel menu's own width was min(250px, 32vw), which only ever resolved to 250px above the 800px breakpoint; it is the shared 260px now, because the two pages draw one menu and a menu has one width. The grip is positioned against the row/grid around the menu, not inside it: the menu is its own scroll area, and a handle within it would scroll away with the entries. Being absolutely positioned it is neither a flex item nor a grid item, so it adds no column and no gap - which is why the shared menu template can carry it as a second root and every Admin Panel pane gets it without naming it. Clamped to 160px..min(600px, window - 240px), with no drag on a phone, where the menu is full width above the content, and none while it is folded, where there is no edge to drag. The All Boards menu also takes max-width:100% now, because the phone rules cap its track at 210px and a fixed width ran out past it. Remembered in the same three layers as the fold: a Session value first, then profile.leftMenuWidth, then the wekan-left-menu-width COOKIE when nobody is signed in - the same cookie mechanism the fold uses rather than the localStorage the right sidebar's width uses, so one reader's menu is not remembered in two different places. Saved once, when the drag ends; while dragging, the property is written directly so the edge follows the pointer without a database write per pixel. The server method clamps again and refuses NaN, which passes check(width, Number) and would otherwise store a width no page could recover from. Thanks to xet7 ! |
||
|
|
8ef151696d |
Folded, the left menu is gone - and the pane title brings it back.
Folded, the menu was a narrow strip with the caret alone in it. A strip is still
a column: it holds width, it keeps the page from starting at the window edge,
and a caret alone in it is a target that has to be aimed at.
Folded now means gone - no column and no strip - and the way back is the PANE
TITLE beside it: the caret moves to the inline start of the heading, and the
caret and the title are ONE target, so clicking anywhere on it brings the menu
back. Nothing is lost by drawing nothing, because the way back is the largest
thing on the page rather than the narrowest. The heading is drawn even for a
pane with no title of its own - paneTitle() returns {} when no entry is active -
so a folded menu can never be a menu you have lost.
One caret template still, included in both places on both pages, so they cannot
drift. Beside a title it is handed the pane's text as paneTitleKey / paneLabel
rather than the titleKey / label paneTitle() itself uses, so the caret at the
top of the menu, which inherits whatever context the menu sits in, can never
pick a title up by accident. It is an anchor with no href, so it carries
role="button", tabindex="0" and a keydown handler for Enter and Space: without
them the menu could be folded with a mouse and only with a mouse. Its tooltip
and aria-label are one string from a helper that names the pane as well beside a
title, because an aria-label REPLACES the text inside the element and the bare
word would have silenced the heading.
Which element takes the collapsed class differs by page, and that is the point.
The Admin Panel marks its menu: it is a flex row, and a hidden flex item closes
the row up by itself. All Boards marks the GRID, because display:none takes an
element out of a grid but the TRACK it was placed in remains - hiding only the
menu would have left the boards in the auto column with an empty 1fr one beside
them. The grid drops to one column and hides the menu in the same rule, with
!important, because the phone rules set both tracks with an !important of their
own and a phone would otherwise be the one screen still holding an empty column
open.
Thanks to xet7 !
|
||
|
|
2526552764 |
The left menu's caret does something when clicked.
The caret that folds the left menu away - on All Boards and in the Admin Panel - rendered, pointed down, and did nothing at all when clicked. Its template draws the caret; the click that folds the menu and the isLeftMenuCollapsed helper that says whether it is folded live in client/components/settings/leftMenu.js, and nothing imported that file. package.json sets meteor.mainModule, so the client is NOT eagerly loaded: a file nobody imports is not in the bundle at all. The click handler was never registered, so the caret was a dead control - and an unregistered Blaze helper is undefined, so the panel never took the collapsed class either, which is why even the caret itself never turned to point right. The same thing had happened to adminReports.css, which is why the Admin Panel reports lost their styling. One import fixes it. The new guard is what stops it happening a third time: tests/clientBundleImports.test.cjs walks the import graph from client/main.js and pins that every file under client/components which REGISTERS something with Blaze - a template's events, helpers or lifecycle, a global helper, a BlazeComponent - is reachable from the entry point, and that every stylesheet and template beside them is too. A file that only exports helpers is left alone: whoever uses it pulls it in. It carries the negative case as well, checking that removing this very import is reported rather than shrugged off. Thanks to xet7 ! |
||
|
|
5df6f28421 |
Left menus fold away, with the caret a list already has.
At the top of both left menus - All Boards and the Admin Panel - there is now a caret that folds the menu away, and the same caret brings it back. It is the control a list has on a board: pointing down while the thing is open and right once it is folded, with the same two words in its tooltip, so there is nothing new to learn. Folded, the menu is a strip holding only its caret and the page beside it takes the width back. Folded rather than hidden outright: a menu with no way back is a menu you have lost. Everything but the caret goes through a :not() on the caret rather than a list of names, so a row added later cannot be left sticking out of a narrow strip. On All Boards the width moved from the grid track onto the menu itself, because a fixed 260px column would hold the gap open beside a folded menu. One state for both pages: they draw one menu, and a reader who folds it away on one of them has said what they want on the other. It is a Session value first, so the fold is instant rather than waiting for a round trip, then profile.leftMenuCollapsed on the user document, and a cookie when nobody is signed in - a public board has this menu too - through the same cookie helpers the public list and swimlane collapse states already use. One caret template for both menus, so the two cannot drift into two different carets, and the helper that reads the state is global because the panel that takes the class is a different element in a different template on each page. Thanks to xet7 ! |
||
|
|
a88dc8cbba |
All Boards: every section names itself at the top of its pane.
The right pane began with board tiles and nothing said which list they were. The page is five lists of boards under one name - Starred, Remaining, Home, Templates, Archive, and a workspace - so the pane now opens with a heading naming the one you are looking at. It is the Admin Panel's own paneTitle template with the same .admin-pane-title class, so the two pages have one heading at one size and colour rather than two written twice that drift apart. Only the space below it is set here: the Admin Panel's gap rule is scoped to its own main-body and does not reach this page. Drawn once, above the view branch, since the board icons and the Table are two ways of showing the same section rather than two sections. Its words are the section's own title key - the same key the first header bar names the page with and the same one the highlighted menu row carries - so all three say the same thing. A workspace shows its own name instead, untranslated: a workspace called "starred" is not the Starred section. Thanks to xet7 ! |
||
|
|
40325c88fd |
Left menus keep the neutral panel with the themed selected row.
Both left menus - All Boards and the Admin Panel - are a light grey card, and the entry you are on is filled with the theme colour with a white label and icon: the same treatment the selected tab gets in the bar above it. A menu is chrome, and tinting the whole card fights the content beside it. The panel, the labels, the hover, the dividers, the group headings and the counts are all as they were, and every theme's own header rule names the selected row again - including the colour slide of a clear* theme, which a --theme-accent value cannot carry. The guards and docs/Design/Page/Left-Menu.md describe this arrangement. Thanks to xet7 ! |
||
|
|
83e832e9e7 |
Left menus: the menu carries the theme, and the selected row is the white one.
Both left menus - All Boards and the Admin Panel - were a light grey card with one row filled in the theme colour. That made the filled row the only part of the page answering to the theme, so a menu read as a plain grey column with a coloured stripe in it rather than as a side of the app, next to the header bar it sits under. Inverted: the PANEL is the theme colour with white labels and icons, and the row you are on is a white block cut out of it with dark text. It is also the easier selection to find - the eye goes to whatever differs from its surroundings, and one white row in a coloured column differs more than one coloured row in a white one. The menu is the colour of the first header bar above it, including the colour SLIDE of a clear* theme, which a --theme-accent value cannot carry. Every theme's own header rule now names both menus: before this only six of them named the All Boards menu, so most themes coloured one menu and left the other one plain. No theme rule may name the selected row any more - it would paint that row the same colour as the menu behind it and leave nothing to show which row is selected - and a guard checks that. Hover on an unselected row is a wash of white over the theme colour rather than solid white, which would be indistinguishable from the selected row. The dividers, the group headings and the counts went with the rows, for the same reason: a dark rule on a coloured panel is a rule nobody can see. Two pairs of duplicate count rules were merged while doing this. Each had a base rule and a colour override with the same selector, which is how a guard came to read the wrong one. Documented in docs/Design/Page/Left-Menu.md. Thanks to xet7 ! |
||
|
|
aa16115c7d |
All Boards Home: the launcher's Remove bar, and one destination for the drag.
Home no longer takes the top row of the left menu. The top row stays the one the page opens on - Starred when anything is starred, Remaining when nothing is - and Home sits under the two of them: after login you are already in the Home board, so the row that names it is a place to look, not the place to start. Taking a board off Home is now the Android launcher's gesture. Pick the board up in Home and a Remove bar appears above the tiles, only while the board is actually in the air; drag the board onto it and it turns red; let go and it asks, and the question says the board itself is not deleted. An affordance that shows up when the gesture is possible explains itself, and a trash can sitting permanently under somebody's boards is a button nobody dares press. Every other target now REFUSES a board that came from Home, in dragover, by not calling preventDefault - which is how HTML5 drag and drop says no, so the cursor says no while the board is still in the air. That check cannot call getData: the drag data store is protected until the drop and only the list of types is exposed, so the fact lives in the type's name, application/x-board-from-home, and its presence is the message. Before this, a board dragged out of Home onto any other row cleared Home on the way past. That made every drop a Home drop, and a board could leave Home by accident while being filed into a workspace. One gesture, one destination. Also repoints two Upcoming CHANGELOG links at the commits that are actually in history: amending a commit after writing its hash into the CHANGELOG left both pointing at objects the branch does not contain. Thanks to xet7 ! |
||
|
|
eea1f2ffed |
All Boards: Home, a section for the board that opens after login.
One board can be Home: logging in opens it instead of the All Boards page. That has always existed, set from Multi-Selection's "Set as Home board (opened after login)", but there was nowhere that said which board it was - the setting was write-only, and the only way to find out what you had chosen was to log out. Home is now a section of All Boards with a row in the left menu, a home icon and the word Home, a count beside it, and the address /allboards/home. It is the first row when a Home board is set - it is the board this user starts in - and still there, further down, when none is, because the place to drop a board onto has to exist before there is anything in it. Drop a board on the row to make it Home. A drop replaces rather than toggling: Home holds one board, and a drop that sometimes set and sometimes cleared would depend on state the reader cannot see while dragging. Home is a mark on a board, not a place boards are kept - exactly like a star. The board stays in Remaining, or in its workspace, and appears in Home as well; dragging it out of Home onto any other row takes it off Home and leaves it where it lives. That is why the drag carries where it started. The server accepts only a board the caller is a member of and that is not archived, and clears only the board that is actually theirs. Nothing automatic writes it; Sandstorm's auto-open still persists nothing. Documented in docs/Features/Board/Home.md. Thanks to xet7 ! |
||
|
|
50a1d4263e |
All Boards: open Starred, or Remaining when nothing is starred.
Starred was always the section All Boards landed on. On an account that has starred nothing that is an empty page with a full one behind it, which reads as WeKan having lost the boards rather than as a section nobody has filled in. Now the address that names no section opens Starred when the user has starred boards and Remaining when they have none, and the left menu puts whichever one that is on top, so the highlighted row is the first row. Only those two move. The rule is defaultSection() / menuSectionOrder() in models/lib/allBoardsUrls.js so the page and its guard read one copy of it. The router no longer answers the question - it runs before the user document has necessarily loaded - and the page answers it in an autorun, from the user document's own starred list rather than from the query that counts boards, whose answer depends on the subscription and would draw Remaining and then jump to Starred mid-load. An address that does name a section still wins. The four menu rows became one row drawn once per section, since an order that depends on the user cannot be four copies of the same markup. Thanks to xet7 ! |
||
|
|
81542cfaed |
All Boards: the left menu says "Archive".
One word, like Starred, Templates and Remaining beside it, and the menu already says what it is listing - "Boards in Archive" repeated that. It uses 'archives', an existing key translated in the same 135 languages as the one it replaces, and the one already used for the archive as a PLACE rather than as an action. The SECTION title changes with it. A guard pins the two together on purpose - the header's path names the section and the highlighted menu row names it too - so renaming only the row would have left "All Boards / Boards in Archive" above a row saying "Archive", and a reader would have had to work out whether those are one place. The guard caught exactly that, which is what it is for. The sidebar's own row keeps its longer label: it sits among Search and Multi-Selection rather than among one-word sections, and xet7 asked about the left menu. One guard fix: the row was sliced out of the markup by a character count, and the comment explaining this change pushed the label past the end of it. It slices from the row's own list item to the divider that follows now, so a row that gains a line does not need the number re-tuned. 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 ! |
||
|
|
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 ! |
||
|
|
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 ! |
||
|
|
f2b8716c8d |
Stop the header label fit from looping the ResizeObserver.
"ResizeObserver loop completed with undelivered notifications", from the fit I added: it ran inside the observer's own callback, and measuring means SHOWING the labels and possibly hiding them again - which resizes the very element being observed. So every notification produced a write and the write produced another notification, and the observer never settled. Two changes, and the first is the one that matters. The bar is re-measured only when its WIDTH has changed. In the steady state nothing is written at all: with the labels already hidden and still needing to be, the old code removed the class and added it back on every single cycle. Verified by running the real function against a bar that wraps while its labels are shown - one write to settle, then zero, then zero, and two again only after a genuine width change. And the fit is scheduled for the next frame rather than called inline, so the write is an ordinary one whose resize is delivered normally instead of being raised from inside the callback that is handling the previous resize. The opt-out path now shows the labels in its own branch, since it returns before reaching the measurement. Without that a page that opts out would inherit whatever the last measured page left on the bar - a link from a narrow board to All Boards would land there with the names hidden - and the guard checks that branch rather than the statement order it used to rely on. 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 ! |
||
|
|
040526db51 |
All Boards and the Admin Panel keep their button names at every width.
Those two carry four buttons each and have room for the words on any window worth supporting, so the fit measurement leaves them alone. A board carries ten controls, and is the page the measurement exists for - there it still drops the names when the bar would wrap. The header marks the bar `header-labels-always` from the route, and fitHeaderLabels() returns early when it sees that class. Which page you are on is the header's business; client/lib/utils.js knows only about boxes, and teaching it about routes would have put the same question in two places. It returns AFTER showing the labels, not before. A page that opts out would otherwise inherit whatever the previous page's measurement had left on the bar - so following a link from a narrow board to All Boards would land on All Boards with its names hidden. The guard pins that ordering, because it is invisible from reading the two lines in isolation. 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 ! |
||
|
|
8897be9f05 |
Five more colour slides: cleargreen, clearorange, clearpink, clearpurple, clearred.
clearblue was the only theme in the "clear" category. Five more join it, each a slide from a light tint down to an existing FLAT theme's own colour, so the two categories now cover the same colour families: cleargreen from limegreen, clearorange from pumpkin, clearpink from moderatepink, clearpurple from wisteria, clearred from pomegranate. A reader who picks either version of a colour gets the colour they expected. The rest of each palette is arithmetic on the base, and it is clearblue's OWN arithmetic - its numbers turn out to be exact. The border under the bar is base x 0.8, the one above it base x 0.6, the current tab base x 1.15, a selected minicard the base mixed toward white. Derived rather than guessed, so no theme can be half-done and a seventh slide is one line rather than a page of hexes. Each block was generated from clearblue's with one deliberate exception: its COMMENTS were dropped. They explain clearblue's own history - the flat bar that looked like strongcyan, the half-white username - and copied into a green theme those sentences are simply false. Each block carries a header saying what it is and what it was derived from instead. Every hex clearblue names was mapped, and the generator refused to run if one was not: an unmapped colour would have stayed blue inside a green theme. Board Settings, Member Settings and Admin Panel / Settings / Visibility are one picker with a scope, grouping by THEME_CATEGORIES - so adding each theme to the category and to ALLOWED_BOARD_COLORS puts it in all three at once, gives it the category's two custom colours (a slide has two ends), and validates it on the server through the same list. And a bug of my own, from making Boards in Archive a section of All Boards: clicking it highlighted Remaining. The workspaces-tree autorun treats anything that is not a section as a workspace id, and a workspace missing from the tree was deleted, so it resets to Remaining - but the section names were written out by hand there, and `archive` was not among them. It reads ALL_BOARDS_SECTIONS now, the same list the router and the URLs use, so a sixth section cannot go missing from it. Guards: every theme in "clear" must be a gradient with two DIFFERENT ends whose solid end is the accent everything outside a board reads - a slide theme with a flat bar is a flat theme filed in the wrong drawer, which is exactly what clearblue's own first bar was until it was fixed. Each must paint the picker swatch, the board canvas, and both selected menu rows. And the archive-highlight fix is pinned including its import, because a missing import there is a ReferenceError at runtime that no unit test would see - which is how it first showed up. Thanks to xet7 ! |
||
|
|
145d76c286 |
Header: show the root, put the path in its tooltip.
The bar showed the whole path - All Boards / Workspaces / Engineering /
Backend, Admin Panel / Settings / Version. The path is what the page IS, but it
grows: a workspace nests as deep as its tree does, and this bar is the one strip
always on screen and already short of width. It shows the root now, and the
whole path is the title's tooltip.
headerTitleFullPath() resolves it to one string, because a title attribute is
plain text and cannot hold the {{_ }} calls the visible version used. It reads
the SAME headerTitle() and the same trail the visible name does, so the two
cannot disagree about where you are, and a workspace's own name still does not
go through the translator.
The trail became a plain function rather than a helper. The first version of the
tooltip called sibling helpers through "this", which in a Blaze helper is the
DATA CONTEXT, not the helpers object - so it would have resolved to nothing at
all. Both callers use the function now, and the guard says why, because that is
a mistake worth only making once.
The headerTitleTrail helper is deleted rather than left: nothing draws the trail
inline any more, so it was a helper no template calls.
Thanks to xet7 !
|
||
|
|
e21a2fef1b |
Themes: put them on the bar that is actually painted.
The theme lived on the second header bar, and most pages no longer render one. Three themes were wrong once it moved to the first. clearblue is a colour SLIDE, and the slide was only ever on '#header #header-main-bar' - the inner element of the second bar. The first bar took the flat background-color beside it, #00aecc, which is strongcyan's colour EXACTLY: choosing clearblue painted the header strongcyan. The slide is on #header-quick-access now. natural and modern each had a LATER rule repainting the first bar the near-black shade it wore as a thin strip above the coloured main bar - #2d392b and #333 !important. Picking Natural painted the header near-black and Modern charcoal, whatever their own colours were. Both overrides are gone; the shared rule provides each theme's own colour. Modern's padding and font-size went with it: those sized the strip, and this bar sizes itself like every other theme's. clearblue's username is full white. Half-white was right when this bar was a secondary strip and its username and board links were background furniture; it is the header now, and no other theme dims them. And a slide is not a colour. Everything outside a board reads --theme-accent, which is right for the eighteen flat themes but cannot carry a gradient - so the All Boards left menu's selected row sat flat #00aecc beside an Admin Panel row that slid. It is named in clearblue's own rule now, as the Admin Panel's row always was, and its extra class makes it win over the accent rule. tests/themeAccents.test.cjs pins every theme painting the first bar, painting it its own colour, and NO TWO THEMES painting it the same - which is the check that would have caught clearblue looking like strongcyan. Two mistakes of mine here, both caught by the guard rather than by reading: the first version of that guard anchored on a selector prefix the flat rule and the gradient rule share, so it read the wrong rule and passed; and the first attempt to add the tests to this file used a harness shape the file does not have, so they silently never ran. Recorded and NOT changed: cleanlight's accent is a mid-grey scraped from a '#header ul li:hover' rule, because it has no plain #header rule at all. Its bar is near-white and cannot be an accent for white text, so the grey is right by accident. Choosing a deliberate one is a call about a colour, not a bug fix. Thanks to xet7 ! |
||
|
|
cb728c334b |
All Boards left menu: match the Admin Panel's rows, not just its colours.
The menu had the Admin Panel's panel and its accent, but its rows were still laid out the old way - rounded pills, floating inside a panel that added 8px of its own padding on top of each row's margin. Two menus wearing the same colours and reading as two different menus. The rows now use the same margins (2px 4px), the same block padding and reading-direction indent (12px / 18px), and NO rounded corners, so a selected row is a block across the menu rather than a pill inside it. The panel's own padding goes with them: the rows carry their margin themselves, and padding on the panel inset every row a second time. The dividers line up with the rows rather than running past their ends, and "Workspaces" takes the Admin Panel's group-heading treatment - smaller, uppercase, quieter - because it names a group and is not an entry of one. Thanks to xet7 ! |
||
|
|
b45e19ef8d |
All Boards: take the left menu to the window's left and bottom edges.
The menu was styled like the Admin Panel's but did not sit like it. The Admin Panel gets that for free: .setting-content is OUTSIDE .wrapper, absolutely positioned at full width and height, so its menu is against the left edge and runs to the bottom. All Boards is in normal flow inside .wrapper, which is width: calc(100% - 28px); margin: 0 auto - so the menu floated 14px in from an edge it is meant to look attached to, and stopped wherever its content did. This page opts out of that inset, and takes its height from 100vh minus --wekan-header-height - the height the header MEASURES itself to be, because the bar wraps to a second row and is not one fixed number. A MINIMUM, not a fixed height: a page with more boards than fit still grows past it, and grid items stretch to the row by default, so the menu fills whichever is taller without asking for a height of its own. The phone rules already override .boards-layout's height through a higher specificity selector, so the inner scroller they set up is untouched. The guard reads the .wrapper declaration across layouts.css rather than inside the first block it finds: .wrapper is declared more than once there, and the first block carries only the comment explaining the sizes. Thanks to xet7 ! |
||
|
|
a05c1ac08a |
All Boards: the archive is a section of this page, and the menu looks like the Admin Panel's.
Boards in Archive moved again, to under Remaining, and it no longer LEAVES this page. It opens as a section drawn beside the left menu: selecting something from a menu and then losing the menu is a menu that throws itself away. Its address is /allboards/archive, the same shape as the other four sections, and the template is the archive's own so its search and its pager come with it. The standalone /archive page stays for a direct link, and the sidebar's row still goes there. It carries a count like the three lists above it, asked of the SERVER rather than counted from what the page has - All Boards does not subscribe to archived boards at all, its query is archived:false, and the archive's publication is paginated to 30, so counting minimongo would answer 0 on a fresh load and something arbitrary later. getArchivedBoardsCount is the method the archive's own pager already uses. Boards can be dragged onto that row to archive them, from any of the four lists or from a workspace. The left menu already accepts a drop on Remaining, so this is the gesture already in the reader's hand; the alternative was three clicks through Multi-Selection. It asks first, because a drop is easy to make by accident - a board dragged to reorder that lands one row low - and it refreshes the count afterwards, which a method call will not do on its own. The Multi-Selection button in the header bar now shows that it is on and offers the way off, the same pair the board's own has. It looked identical either way, so the one control that changes what clicking a board does gave no sign it had changed it. Its helper is registered on the template that uses it: a Blaze template cannot see a sibling's helpers, and that failure is a hard render error. The Sort Boards popup is titled from the key that phrase already has, which is what gives it a header and with it a close button. And the left menu is styled like the Admin Panel's - a panel with its own background, border and rounded corners, a selected row in the per-user theme accent with white text, a white hover with a shadow, and scrolling inside itself rather than spilling past its own corner. WeKan has one kind of left menu. One guard was rewritten rather than widened: it looked for a handler within 400 characters of its event map, which has to be re-tuned every time a comment is added inside that map. It is scoped to the block now. Thanks to xet7 ! |
||
|
|
2c39a83b6a |
All Boards left menu: make the Workspaces rules dark grey.
The rules above and below the Workspaces section were a #e0e0e0 hairline - the same grey as the menu's own right edge - and too faint to separate anything. They are 2px #888 now, a grey this stylesheet already uses. A light grey needs AREA to be seen at all, and area is what turns a divider into something that reads as another row of the menu; a dark grey is legible as a line, so it stays a line. 2px rather than 1: at 1px a mid-tone rule can land on a half-pixel boundary and be drawn as two lighter rows on a fractional-scale display, which is the same faintness this was meant to fix. Thanks to xet7 ! |
||
|
|
6d50d9d66b |
All Boards: Boards in Archive belongs in the left menu.
It was a button in the first top header bar beside Sort, Search and Multi-Selection. Those three act on the boards in front of you; Boards in Archive is a PLACE you go instead, so it sits with the other places - a row of the left menu, below the Workspaces section, drawn like Starred, Templates and Remaining rather than as a stray link. The Workspaces section now has a rule above and below it. The left menu is three kinds of thing in one column - the three board lists, the workspaces tree, and the archive - and without them the tree ran into its neighbours as if it were more of the same list. One hairline in the same grey as the menu's own right edge, not a default hr: that is a beveled 2px ridge and reads heavier than the border it sits inside. The workspaces header's own top margin goes with it, or the rule and the margin together read as a gap twice as wide as anything else in the menu. The click handler moved WITH the markup, into the map of the template that now draws it. A Blaze event map only sees events inside its own template, so a handler left behind in allBoardsHeaderButtons would never fire and the row would silently do nothing - which is exactly what happened to this button once before. The guard checks both halves: nothing left in the old map, and a handler in the new one. Two existing guards caught the move rather than being edited into agreement with it, and each now says where the button went. Thanks to xet7 ! |
||
|
|
574c72370f |
Search shuts the panel it opened, and the Admin Panel tabs get their names.
Search was the same shape as Filter: it only ever OPENED, so clicking it while the sidebar was already showing search did nothing visible and the only way back was the sidebar's own X, somewhere else on screen from the thing you just clicked. The two now share one rule. models/lib/filterButton.js is models/lib/sidebarViewButton.js, because a module named after Filter answering for Search would be a name that lies, and one toggleSidebarView() helper applies it - two copies of "which way does this click go" would eventually be two answers. The exception stays Filter's alone, and is now named as what it is rather than assumed: with a filter ON the sidebar is the one place that says what is being hidden from the board. Search has no such case - its results are inside the panel and it hides nothing from the board - so it passes false and always toggles. The Admin Panel's four tabs carry their name beside the icon, each from the same key its tooltip uses, and lose it below 1100px with every other label in the bar. Thanks to xet7 ! |
||
|
|
c48d9e533d |
All Boards: name its four controls too, and re-wrap the entry they share.
Sort Boards, Search, Multi-Selection and Boards in Archive each carry their name beside the icon now, from the same translation key their tooltip uses, and lose it below 1100px with every other label in the bar. The board's visibility and watch buttons got theirs in the previous commit; the changelog paragraph that lists which buttons are named has now grown twice, so it is re-wrapped as a whole rather than patched line by line - patching it left a ragged 20-character line in the middle. That paragraph is also what broke tests/changelogFormat: the guard tolerates 250 over-long lines of legacy content and my edit made it 251. It was failing when I committed the previous change, because I piped the test run through tail and the pipe swallowed its exit code. Fixed here, and worth remembering: the suite runner must be checked by its own output, not by a pipeline's status. Thanks to xet7 ! |
||
|
|
7ac766992f |
Header bar: name the visibility and watch buttons too.
Private / Public and Watching / Tracking / Muted are the state of the board you
are looking at, and a padlock or a crossed-out bell is a poor way to read it.
Both carry their name beside the icon now, and both lose it below 1100px with
every other label.
The label is the same DYNAMIC expression as the tooltip - {{_
currentBoard.permission}} and {{_ watchLevel}} - so one line of markup covers
all five values. Written out per value it would be two lists of words to keep in
step with each other and with the board.
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 ! |
||
|
|
1a4e87c19f |
Starred boards popup: a title, and so a close button.
The popup had no title, so it rendered as a no-title pop-over: no header, and the close button lives in the header, leaving nothing to shut it but clicking away. It is titled "Starred Boards" now, from starred-boards - the key the app ALREADY has for that phrase - through a new titleKey option on Popup.open. The convention is <popupName>-title, which is right when a title is that popup's own words and wrong here: adding starredBoardsPopup-title would put a second copy of one phrase into all 147 language files, English in every one of them at first, so most languages would show English for something they have already translated. The convention still applies to every popup that does not pass a key. The board's own Multi-Selection button carries its name beside the icon now. All Boards' got its label earlier; this is a different button in a different file and was left behind - a check-box outline says nothing about what either does. 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 ! |
||
|
|
e755b60b37 |
Link to a swimlane or a list, the way you can link to a card.
A card has had an address since there has been a card route. A swimlane and a list had none: "the Backlog list of this board" could only be sent as "open this board and scroll down". Worse, List.absoluteUrl() answered with the URL of whichever CARD the cache returned first for that list, so the one place that did offer a list link - listMorePopup - showed a card's address, and an empty box for an empty list. Both have their own now: /b/<boardId>/<slug>/swimlane/<swimlaneId> /b/<boardId>/<slug>/list/<listId> FIVE segments against the card route's four, which is the whole reason the three can coexist: a card URL cannot match these and these cannot match a card. A guard checks all nine combinations, because losing a segment would silently turn a link to a list into a link to a card called "list". The kind is a word in the path rather than a query parameter - it is part of what the address names, and a reader can see which is which. config/router.js registers the routes from the same constants the links are built from, so the two cannot disagree about the path. Following one brings the thing into view. The route cannot do that: it runs before the board has rendered, and on a board that is already open it runs without re-creating anything, so at that moment there is nothing on screen to scroll. It names what to reveal in a Session value and the board body reveals it, WAITING for the element rather than assuming it - swimlanes and lists arrive as their subscriptions do and a large board renders in more than one pass, so a single look on the next tick finds nothing on a cold load. It gives up after a few seconds rather than spinning: a link to a list that was archived names an element that is never going to exist, and the board is still the right place to have landed. The Session value is cleared when acted on AND when given up on, so it is a one-shot instruction about the address you followed rather than a standing order that re-scrolls on every later render - and cleared BEFORE the scroll, because scrollIntoView can re-enter the autorun through the reactive read. Every other board route clears it too: without that, opening a card after a list link would scroll the board away from the card it had just opened. The element ids are the ones the templates already carry, held as a map and not derived by a rule. Deriving one name from another is how allBoardsMultiselectionSidebar happened, and this failure is silent - nothing is found and nothing is reported - so a guard checks each id against the markup that draws it. All three are copied the same way, from the FIRST row of the hamburger menu, with the link icon and the name beside it. The card carried this as an icon in its title header named only by a tooltip, which is the one place a name cannot be read without hovering; that button is gone, and so are its handler and the "Copied" tooltip only it used - a handler for markup that no longer exists is dead code that reads as a working feature. The copy row sits ABOVE every permission check in those menus. Copying an address is reading, not editing: somebody who may only read the board can still tell a colleague which list they mean, while everything else in those menus changes the board and stays guarded. It copies absoluteUrl(), because what lands in the clipboard is pasted into a chat and a relative path is only a link inside this page. copy-link-to-clipboard is added to all 147 language files, in the same position in each. 119 are really translated, each derived from that language's OWN existing copy-strings rather than invented. The 16 that keep the English placeholder are the ones whose existing copy-strings are already in the wrong language - Romanian holding Italian, Esperanto holding Spanish, Hindi holding Gujarati - where deriving from them would only spread the error; the en_* variants are English by design. docs/Design/Page/Header.md is written at last. Twenty-seven comments have been pointing at it since the header restructure began and it had never existed, so every one of them was a dead reference. Thanks to xet7 ! |
||
|
|
6051a4368b |
All Boards: four controls into the header bar, and no hamburger to open.
Sort, Search, Multi-Selection and Boards in Archive were rows of the right sidebar's home view, so reaching any of them meant opening a panel over the boards first. They are icons in the FIRST top header bar now, left of the notification bell - exactly where a board's own controls are - each named by a tooltip, like every other button of that bar. They have now been in three places: the page's own body, a second top header bar, and that sidebar view. The home view was the only thing the hamburger opened, so All Boards no longer offers one, nor the divider before it. A menu to reach what is already one click away is a step with nothing in it. NO_HAMBURGER_ROUTES in models/lib/pageSidebar.js is what says so, and a board is deliberately not in it: what a board's sidebar holds - members, labels, activities, settings - is not in the bar and has nowhere else to be opened from. The sidebar is still reachable, and that mattered enough to guard: removing the hamburger removes the only generic way in, so Search and Multi-Selection opening it ARE the way in, and if their event map went the panel would become unreachable and both features would stop existing. The home view is not dead markup either - it is what the back arrow of the other views leads to. Boards in Archive is drawn in two places now. A Blaze event map only sees events inside its own template, so each copy needs its own handler; a copy with markup and no map is a button that silently does nothing, which is exactly what happened to that button once before. The guard checks both copies rather than one. Three existing guards had to change, and each says why: the page-body check now scopes itself to the board-list markup rather than the whole file, since the controls live in that file again; the archive guard checks both copies instead of asserting the header must NOT handle it; and the hamburger guard learned that a page can have a sidebar and still not be offered one. docs/Design/Page/All-Boards.md described a second header bar that no longer exists, so its controls section is rewritten to what is there. Thanks to xet7 ! |
||
|
|
1164785d1d |
All Boards: the header bar names the list, and the workspace inside it.
The bar said "All Boards" on Starred, on Templates, on Remaining and inside every workspace - it named the page and not the list you were looking at. It shows the path now: All Boards / Starred, All Boards / Workspaces / Engineering / Backend. The section's words are the LEFT MENU's own key, so the title and the row highlighted beside it always say the same thing. A workspace's words are its NAME rather than the slug the URL carries - the slug is lowercase and hyphenated and is not what the workspace is called - and the name is printed as text rather than translated: it is what a person typed, and a workspace called "starred" is not the Starred section. A trail segment that names nothing stops the walk and the title shows what was still real, so a stale link names the part of the path that still exists rather than nothing at all. The header walks the tree itself, from the URL and from user.profile.boardWorkspacesTree, which is where the All Boards page reads it from too. It cannot ask the page: the header is a separate Blaze instance, and importing a page module from here once ran it before its own template was registered, and the throw aborted every module after it. The Admin Panel's two segments and these are ONE list now, not a helper per segment. The two pages do not have the same number of them - the panel always has two, a workspace has as many as its tree is deep - so a fixed set of helpers could only ever serve whichever page was written first. Each entry is one of the two forms a left-menu entry already has: a key for something translated, a title for text that must not go through the translator. Guards in tests/headerBars.test.cjs pin every section's key against the left menu's markup and against en.i18n.json, that an unknown section titles the default rather than nothing, the name walk including both ways it can stop early, that the tree comes from the user document, that a workspace name is pushed as a title and never as a key, and that a board has no path at all because its own title is the whole name. tests/adminUrls.test.cjs follows the panel's pane title into the same list. Thanks to xet7 ! |
||
|
|
03cb79bdd7 |
Admin Panel under /admin, and a header that says where you are.
The four pages sat at the TOP level - /settings, /people, /attachments - as if they were pages of the app rather than of the Admin Panel, and /attachments is also the path the file server serves attachments from (server/routes/universalFileServer.js), so the panel and the files were claiming one address. They are under /admin now: /admin/settings/version, /admin/people/login, /admin/problems/database, /admin/attachments/backup. The default pane is named too. It used to be left implicit in a bare page URL - /settings rather than /settings/version - so the address of "Settings" and the address of "Settings showing Version" were one string. The address is meant to say where you are, and the first pane is somewhere too. The bare /admin/settings still resolves; it redirects to the pane's own address rather than being a second name for it. Every path the panel used to answer on redirects - the bare old address, the old one with a pane in it, and /setting, /information, /translation. They are built from the same map the URLs are, so a page cannot be given an address without also being given its redirect, and a bookmarked /settings/global-webhooks keeps its pane instead of landing on the top of the panel. The title beside the house icon names the same three things: Admin Panel / Settings / Version. The page's words are the tab's own key and the pane's words are the menu row's own label, so the title, the tab that is marked active, and the row that opened the pane cannot say different things about one place. The pane title is read from the URL rather than from the page, because the header is a separate Blaze instance from the Admin Panel's pages and must not import them - doing that once ran a page module before its own template was registered, and the throw aborted every module after it. That makes ADMIN_PANE_TITLES a second copy of the menus' labels, and a guard checks every entry of it against the real menu entry for that pane. The button of the page you are ON keeps the hover background, permanently and a shade darker. The tabs had 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 had been computed and invisible since they moved. Darker than the hover rather than equal to it: hovering the tab you are already on must still look like a hover. --wekan-header-height measured #header - the SECOND bar - from when every page had one. Most pages have none now, so on those the variable was 0 and everything laid out against it started at the top of the WINDOW, underneath the first bar: the All Boards sidebar covered it. It measures both bars now, as the BOTTOM of the lowest rather than a sum of heights, so any margin between them counts and a bar that is absent contributes nothing without a special case - and each bar has its own ResizeObserver, because the first one wrapping to a second row is a resize of that element and of nothing else. A divider after the notification bell. Everything before it belongs to the page - its controls, its view menu, the panel's tabs; everything after belongs to you - help, your account, the sidebar toggle. Without it the run of icons reads as one list of unrelated things. The URLs went through a hyphenated shape - /admin-settings-version, /allboards-starred - before xet7 asked for the slash form instead. All Boards is back to exactly what it was; only the Admin Panel moved. Guards: tests/adminUrls.test.cjs pins the /admin prefix, that every pane is named in its URL including the default, that each page records the path it used to answer on, that the three redirect shapes exist and carry the pane along, and that every pane title matches the real menu entry's label - both directions, and a translation key has to be a real one. tests/headerBars pins the divider and the darker active mark; tests/sidebarBelowHeader pins that the height covers both bars. tests/adminOldUrlRedirect's route-body helper now understands a route whose path is an expression, since the panel's four take theirs from adminRoutePath(page) so the route and the links cannot disagree. Thanks to xet7 ! |
||
|
|
0461de062f |
Board: the second header bar is gone. It was the last one.
Three things, as asked. NO DUPLICATE BOARD NAME. The second bar drew the board's title in an `h1` of its own, under the same name in the bar above it. The first bar has said it since the first step of this work; the h1 is gone. THE PENCIL IS BESIDE THE NAME. Renaming a board belongs next to the board's name, not in a bar of its own, so `boardEditTitleButton` renders immediately right of the title in the first bar. Board admins only, as before. EVERYTHING ELSE IS AN ICON, LEFT OF THE BELL. Visibility, watch, star, sort, the board's rule buttons, filter, search, dependencies and Multi-Selection, each named by a tooltip and none carrying a visible label. The bar is one row shared with the logo, the starred boards, the view menu, the bell and the user menu; ten labelled buttons do not fit at any width. The desktop/mobile duplication went with it. The old bar wrote the whole set out TWICE - `unless isMiniScreen` and `if isMiniScreen` - because a row of labelled buttons does not fit on a phone. Icons do, so one copy serves both, and the two switches that had to be kept in step are gone rather than kept in step. headerBarControls.jade is deleted. It held one Search button and one Multi-Selection button, written for this bar and All Boards'; both bars are gone now, so a template shared by nobody was indirection rather than sharing. Every route reference goes with the bar: config/router.js names no headerBar at all any more. Six guards followed, and four of them existed only to measure this bar: the title-plus-buttons row that a long board title split across two lines, the wrapper that fixed it, the phone layout, and the hamburger that shared the first row with the title. All of that was one problem, and the problem is gone with the row. Each says so where it used to measure it, rather than being deleted. Thanks to xet7 ! |
||
|
|
a1980ca67e |
All Boards sidebar: put the theme where a theme rule can see it.
The theme class was on the `.sidebar` element itself. Every themed sidebar rule
is a DESCENDANT selector -
.board-color-belize .sidebar .sidebar-content .sidebar-btn { ... }
- so a class on that same element matches nothing at all, and the panel stayed
exactly as it was: white icons and white text on a light grey background. On a
board the class sits on a CONTAINER around the sidebar, which is what makes
those rules apply, and that is what was missing here.
.all-boards-sidebar-theme is that container. It wraps only the sidebar, so the
theme cannot bleed into the board icons behind it, and it is out of flow - the
sidebar inside is fixed - so it costs no layout. Boards in Archive, and every
other .sidebar-btn in the panel, now gets the themed background with its white
icon and text on top of it, and the list rows get the themed hover.
The guard passed on the broken version, which is why it shipped: it asked
whether the theme class was somewhere in the file, not whether it was on an
ancestor of the sidebar. It now asserts both halves - that the sidebar element
does NOT carry it, and that a wrapper containing the sidebar does. Verified it
fails on the markup as it was.
Thanks to xet7 !
|
||
|
|
09003f0172 |
Boards in Archive is a page, not a modal.
It was Modal.open('archivedBoards'), from three different menus, so the one
place that lists every archived board - with its own search and its own pager -
was a box floating over whatever you happened to be looking at. It had no
address, so it could not be linked to a colleague, bookmarked or opened in a
second tab; there was nothing to come back to; and Escape closed it while you
were reading it. "Restore the board I archived last month" is a task, not a
glance.
/archive is a page now, in the default layout, with the same second top header
bar as every other page and the board session state cleared the way the other
non-board pages clear it. The template is the same one the modal used, minus its
own h2: a modal has no header bar to be named in, so it drew its own title, and
on a page that is the title printed twice. archivedBoardsHeaderBar names it
once, where every other page is named. The search, the per-board Restore and
Delete, and the SERVER-side paging all survive the move - the subscription still
publishes one page at a time, so a long archive stays fast.
All four entry points go to it by route NAME rather than by a path spelled out
in four places: the board menu, the member menu, the board sidebar, and the All
Boards sidebar.
That fourth one did not work at all. The row was drawn in the All Boards
sidebar's home view, and clicking it did nothing: the handler it relied on lived
in the header bar's events map and went when that map was rewritten for the
sidebar. A Blaze event map only sees events inside its own template, and the
button had moved out of it. It has its own handler now, and the sidebar closes
behind it - the page it opens replaces the page the panel belongs to.
Written down in docs/Design/Page/Archive.md.
Thanks to xet7 !
|
||
|
|
ae80d997eb |
All Boards sidebar: place it, size it, and give it a theme.
Three things xet7 reported with a screenshot, all of them mine, all of them in the shell the sidebar borrows from a board. It was WHITE TEXT ON LIGHT GREY. .sidebar .sidebar-content .sidebar-btn is a light grey box whose text is white; what makes that readable on a board is a .board-color-* ancestor replacing the grey with a themed colour. This page has no board, so nothing did. The shell carries board-color-belize now, the established default for a themed thing outside a board - globalSearch.js falls back to the same one. It is a class on the element, so the theme is the same on a phone and on a desktop; only the geometry below is desktop-only. It FLOATED OVER THE BOARD ICONS, starting halfway down the page and ending as soon as its content did. It had inherited position: absolute, which resolves against the nearest positioned ancestor: on a board that is the board container, which already starts below the header and runs to the bottom of the window, and this page has no such container. It is pinned to the viewport now - top is var(--wekan-header-height), the height the header MEASURES itself to be (it is not a constant: its buttons wrap to one, two or three rows depending on language and window width, and utils.js keeps the variable current with a ResizeObserver), and bottom is the window. Below the second top header bar, full height, like the board's. And the boards now move LEFT instead of being covered: .all-boards-wrapper.sidebar-open .boards-layout gives the panel its 420px back - the width the sidebar is - so the icons reflow into what is left between the menu and the panel and every one stays visible. Desktop only, both of those. On a phone .board-sidebar.sidebar in the board sidebar's own stylesheet already pins this element - it carries that class - to the full screen width below the header, and there is nothing to move aside from a full-width panel. All three views share the shell, so Search and the hamburger's home menu are fixed by the same change, not only Multi-Selection. Thanks to xet7 ! |
||
|
|
5cc399b473 |
All Boards: a URL for every left-menu entry, workspaces included.
The page was three addresses - / (Starred), /templates and /remaining - and the workspaces tree had none at all. Which workspace you had open was a ReactiveVar, so a workspace could not be linked to a colleague, bookmarked, opened in a second tab or reached with the back button. /allboards/starred /allboards/templates /allboards/remaining /allboards/workspaces /allboards/workspaces/engineering/front-end/design-system The route is '/allboards/:section?/:path*'. :path* is zero or more SEGMENTS - [^/]+ would stop at the first slash and a workspace two levels down would not resolve - so a workspace nests as deep as its tree does. / stays the home and still shows Starred; /templates and /remaining redirect to the new form. A workspace is addressed by the slugs of its NAMES down the tree, not by its id: the id is a random string and a URL should say where you are. The slugs come from getSlug (limax), the same function that gives a board its slug in models/boards.js, so a workspace and a board turn a name into a URL the same way, including the scripts where a naive slugifier returns an empty string. When a name slugifies to nothing anyway - an emoji-only name - the node's id stands in, because a workspace with no address could not be opened from a link. The route resolves the section and splits the wildcard; the PAGE resolves the workspace, in an autorun, once its tree has loaded. The router cannot: the tree is on the user document, which it has no way to read before the page has it. And it has to be an autorun rather than a one-shot read, which would always run before the tree arrived and never select anything. A slug path that names nothing leaves the Workspaces section selected rather than an empty list. models/lib/allBoardsUrls.js takes slugify as an ARGUMENT rather than importing it, so it has no dependencies at all and is unit-tested with a stub - and with the real limax, for the tests that are about the real one. One thing this had to fix rather than add: boardsList.js filters boards by membership only on the All Boards routes, by route NAME, and a route missing from that list falls through to the public-boards branch - the page would have shown public boards instead of the user's own. The new name is in the list, and the guard pins all four. Written down in docs/Design/Page/All-Boards-URLs.md. Thanks to xet7 ! |