mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
eb955e939dcebf818d55fb40407fa357d12266d7
529
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d9c5028ae7 |
Make board content follow view changes
Use the one pending-aware board-view source for both the switcher label and every content layout. Resolve each rendered list container swimlane explicitly so an undefined relative Jade context cannot duplicate cards across lanes, and persist every board favorite through the authenticated server method. Thanks to hmeunier95 and xet7 ! Fixes #6660, |
||
|
|
dbbc2fd9ea | Save the submitted minicard composer | ||
|
|
b8528e30ce |
Keep card title mouse selection native
Exclude inline title editors and their controls from card sorting and window dragging so selecting title text with the mouse stays a native editing gesture. Cover the sortable guard, opened-card drag guard, and real browser selection behavior. Thanks to rmb82 and xet7 ! Fixes #6641, |
||
|
|
fb10b6160c |
Make independent board regions speech-scrollable
Expose every list body and opened card as a named, keyboard-focusable region so speech-recognition and keyboard users can target the correct scrollbar. Cover the actual overflow elements and verify Page Down scrolls both regions in the live browser. Thanks to ProdLead and xet7 ! Fixes #2499, |
||
|
|
3cdc64d14d |
Restore board templates in the top bar
Restore the top-bar Create Board control and classify it as a board-template search just like Add Board. Keep the nested picker open while its template-container subscription becomes ready instead of returning to the parent popup with stale or empty data. Existing copy logic retains custom-field definitions. Add focused and live Chromium coverage for archived-template filtering, card exclusion, and custom-field copying. Thanks to Jimmi61 and xet7 ! Fixes #3070, |
||
|
|
b687f37272 |
Keep dragged cards visible during reactive moves
Preserve a presentation-only copy in the target list while sortable restores the source DOM and Blaze reconciles the database move. Remove it as soon as the real card arrives, on rejection, or at a safety timeout. Add a browser regression with an intentionally delayed move so the visual gap is deterministic. Thanks to mimZD and xet7 ! Fixes #6430, |
||
|
|
f9f9fa4c2d |
Finish browser regression corrections.
Refresh linked-card and date publications after async updates, keep popup keyboard focus contained, correct the phone board-list scroll chain, and make the browser regressions use stable interaction targets. Add coverage for linked-card fields and editing, existing dates, minicard title editing, popup focus, accessibility, and phone board grids. Thanks to xet7 ! |
||
|
|
c476ee45a9 |
Repair browser regressions found by the complete test run.
Restore inline minicard title editing, editable opened-card dates, popup focus containment, accessible loading-state controls, phone board scrolling, and browser assertions for the current card UI. Thanks to xet7 ! |
||
|
|
a830cae647 |
Keep linked-card position outside the Blaze event view.
Thanks to xet7 ! |
||
|
|
798390c6fc |
Restore cross-board linked-card creation.
Thanks to ClemStrummer and xet7 ! Fixes #6613. |
||
|
|
daaf563910 |
Docs: implemented designs move to docs/Features, filed the way the menu is.
A design that describes what WeKan already DOES belongs with the feature it describes, not in the folder for things being proposed. Fifteen docs move: Design/Accessibility.md -> Features/Accessibility/Accessibility-Improvements.md Design/Original-Positions.md -> Features/Board/Original-Positions.md Design/Page/* -> Features/Page/* (thirteen pages that exist) Design/AdminPanelProblems.md -> Features/Admin-Panel/Problems/Design.md What stays in docs/Design is what the folder is for: the principles (Design-Principles, Monkey-Proof-Software), the comparisons, the roadmap (Multiverse), and the proposals not yet built (Multitenancy, Autoupdate). The Admin Panel Problems design is new and covers six changes - summaries, the per-actor tally, IPv4/IPv6 columns, an API report, a per-address login tally, and blocking with increasing delays. Three are shipped and three are planned; it is filed under the feature because the pane exists, with each planned item marked so it can become plain description as it lands. Every reference in the repository is rewritten - 152 files, including the CSS comments that point at the table-page design, which a first pass over .md and .js alone missed. Two suites asserted the old paths and now assert the new ones. A moved doc whose links nobody fixed is worse than one nobody moved. Thanks to xet7 ! |
||
|
|
e948acfdd3 |
Every menu on a board has an Export row and an Import row.
The card, list, swimlane and board menus each had one row, and each named itself differently: "Export card", "Export list / Import", "Export swimlane / Import", "Export board". Two of them mentioned an import that was a section inside the popup rather than a thing to go to, and the card and board menus did not mention it at all - so importing into a list was discoverable and importing into a card was not. Each of the four now has Export and Import, in that order, named for what they do and not for what they act on: the menu already says whether it is a card, a list, a swimlane or the board. Both rows open the same popup - the same panes, the same table of formats, the same selection - with one difference: the second pane offers the formats to write out, or the file to read in. The selection means the same thing in both directions, which is why it is the pane they share. Import writes, so it is offered only to somebody who may change the board. That question is asked once, in one function registered as a helper the four menus use, and asked again inside the popup, because a row that is merely hidden is not a permission check. Thanks to xet7 ! |
||
|
|
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 ! |
||
|
|
53c3123de5 |
Three more forms written once instead of ten times over.
Three shapes were copied, and in each the JavaScript was already one piece while the markup was not - so a behaviour change was one edit and a markup change was four: - where a card goes (board, swimlane, list, above or below which card, Done), drawn four times: Move card, Copy card, Copy checklist to many cards, Convert checklist item to card; - where a list goes, drawn twice: Copy list and Move list; - the Create Board form, drawn four times: the one on All Boards and three popups, one of which creates a template board and says so with a Session flag rather than with different markup. Each is one template now - cardDestinationPicker, listDestinationPicker, createBoardForm - and what it shows is passed in, because a helper is looked up on the template it is written in and not on the one including it. The two pickers are handed the dialog and keep it on their own INSTANCE: inside `each boards` the data context is a board, so a helper reaching into the context for it would find nothing there. The events stay with the popups. An event inside an included template bubbles to the one that includes it, which is the one holding the state - that is what lets four popups do four different things with one form. cardDetails.jade lost 71 lines, boardHeader.jade 58 and listHeader.jade 10, and a scan for near-duplicate templates went from 74 pairs to 9. tests/sharedFormTemplates.test.cjs pins all three, including that the template-board popup still creates template boards. 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, |
||
|
|
d11f5ffdb7 |
Import into a swimlane, a list or a card, beside the one whose menu was
used. Continues #1173, the other direction of the same popup. Importing used to mean one thing: a whole new board, from the full-width page at All Boards. A swimlane's menu now imports a swimlane below that swimlane, a list's menu imports a list after it, and a card's menu imports a card below it, into the board that is already open. "After" is to the RIGHT in English and to the LEFT in Arabic, and that is one rule rather than two. The page carries dir (client/components/main/ layouts.jade), so the board's row of lists mirrors itself and "after in sort order" is already "the other side"; a direction branch in the placement would mirror it twice and put the list back where it started. The reason is written in models/lib/insertPosition.js, next to a negative test, because it looks like a missing branch. Placement is a fraction between the target's sort and the next one's, not a renumbering of every sibling - renumbering is what a board with ten thousand cards cannot afford and what two clients doing it at once get wrong. Several imported items spread evenly through that gap, so a swimlane of ten lists does not arrive with nine of them in the same position. The arithmetic is a pure module and is tested as arithmetic, junk input included. The file is what the export writes, at any scope, and the SAME checkboxes decide what comes in: a document full of comments imported with comments unticked brings the cards and leaves the comments. A .zip is unpacked in the browser and its wekan.json handed to the same method, so there is one import path and not two. Nothing is merged. Everything created is new, with new ids, because an import that half-updated a board would be an edit nobody could undo - importing the same file twice gives two copies, which is at least a thing you can delete. A custom field is matched by NAME, since an id from another board matches nothing here, and a comment comes back under the importing user, because the original author may not exist on this server. Importing WRITES, so unlike the exports beside it in the same popup it asks isBoardMember() rather than isVisibleBy(), the Admin Panel's import switch still applies, the format is checked, and the deadline that bounds a board import bounds this one. A read-only member is not offered it at all. tests/scopedImport.test.cjs covers the placement arithmetic and pins the selection, the write check and the single import path. Thanks to xet7 ! |
||
|
|
bd009cf601 |
Export a board, a swimlane or a list, in the card export's own layout,
with a popup for what to include. #1173 "Add Feature: Print Board with Params" has been open since 2017, and two things were missing. There was no CHOICE of what to print. The board's Excel and PDF exports took everything they knew how to render and nothing else, while the card export already had a popup with a checkbox per section. And they did not LOOK like the card export: the board's Excel export was a spreadsheet table, one row per card and eighteen columns, which is a data dump rather than a printed board. Both now render a board as its own header followed by every card as the CARD export's block, drawn by the card export's own code - cardBlockLines() for the PDF, ExporterExcelCard.renderCardBlock() for the Excel one. A card looks the same whether it was exported alone or inside its board, and the two cannot drift into two layouts again. Each card starts on its own page in the Excel export, because a printed board is read a card at a time. The swimlane and list menus offer the same export, which is the board export with one query parameter saying which cards are in scope. They sit beside "Copy link" rather than under the permission checks, because exporting is reading, and the file is named for what was exported - a PDF titled with the board that holds one list is a file nobody can place afterwards. The selection is one popup body used by all three menus, and one list: models/lib/exportFields.js, imported by the exporters and by every popup. The card export's list used to live twice, in the server and in cardDetails.js under a comment reading "Must match ALL_FIELDS ..." - which is a comment, not a mechanism, and a section added on one side is either a checkbox that does nothing or a section nobody can turn off. The same ?fields= now gates the same sections in both formats; the card popup's checkboxes used to say "fields to include in Excel export" and did nothing to the PDF. A card block cannot be streamed - it merges cells, styles them and returns to earlier rows - and models/server/ExporterExcel.js streams on purpose, after the in-memory version ate gigabytes on boards with thousands of cards. That exporter is still there and still reachable: unticking "Card details" asks for it. A checkbox, not a silent fallback. A board's per-card data is read once per collection and grouped by card. The card export's own per-card queries would be fifteen hundred round trips on a board of three hundred cards. tests/boardExportScope.test.cjs pins the shared block, the shared list, the gating, the three menus and the streaming exporter still being reachable. Two guards moved rather than being deleted: they pinned the board PDF building its own labels and the server's own copy of the field list, which is the behaviour that deliberately changed. Thanks to xet7 ! Fixes #1173, |
||
|
|
664cc6b95b |
Fix #6465: clicking a minicard again really closes the card.
"you now can click outside your mini card and the popout will close. Clicking
the mini card again to close the popout is still not possible I think."
(comment 5281667054), on v10.90 - which already had the toggle, and a test
suite pinning it.
The toggle was closing the wrong thing. On a desktop-sized screen the card
details are NOT the route: clicking a minicard writes the card id into the
`openCards` session list and boardBody renders one draggable window per id in
it, leaving the URL on the board. The toggle asked whether the card was
`currentCard` and closed it with `Utils.goBoardId(...)` - which navigates to the
board route, clears `currentCard`, and leaves the window on screen, because
nothing had taken the card OUT of `openCards`. Only the window's own X button
did that. That is why closing worked from the card and not from the minicard,
and why the guard for the earlier fix passed while the reported behaviour did
not change.
So the two questions become two helpers, and both minicard click paths - the
title, which is most of a minicard, and the rest of it - use them:
cardWindowIsOpen asks the list that RENDERS the window on a desktop, and
`currentCard` for a card opened by its own URL. With "Open
many cards at once" on, `currentCard` is only the last card
clicked, so every earlier window was impossible to close by
clicking its minicard.
closeCardWindow removes the id from `openCards`, clears `currentCard` and
the phone popup ids, and navigates back to the board only
when the card IS the route - a card opened by a click is
not, and navigating would reset the board view for nothing.
That is the card details' own `click .js-close-card-details` logic, so both ways
of closing a card now do the same thing; tests/cardClickToggle.test.cjs pins
that they agree, and its two assertions that pinned the routing close are
replaced with the reason above rather than deleted. The phone path, where the
card is a popup and `Popup.back()` closes it, is unchanged.
Thanks to Heart1010, csonkaoszimt and xet7 !
Fixes #6465.
|
||
|
|
f7b0a4d1d2 |
Fix #6587: a board's type now follows Member Settings / Font size.
"The font size setting in the user menu (Settings -> Font Size) has no effect on mini cards, while it correctly applies to other UI elements." Two halves, and both had to be wrong for this to happen. The preset was applied to <body>. A font-size on body is inherited by children that ask for a relative size, and it leaves `rem` alone entirely - rem is measured against the ROOT element. So anything sized in rem never heard about the setting. And a board's type is sized in px: the list heading, the minicard title and the "Add card" link were pinned to 16/14/13px in #6465, and the minicard's menu, drag handle and mobile icons alongside them. px follows nothing at all - not the root size, not body's - so the board was the part of the UI the setting could not reach no matter which element carried it. So the preset moves to <html> and the board's sizes become rem: 1rem, 0.875rem, 0.8125rem, which are the same 16/14/13px at the default root size. The type scale #6465 set is unchanged and its guard still holds the order; what changes is that a 130% preset now scales it, and 80% shrinks it. The size goes on ONE element only. With it on html AND body, a 130% preset compounds to 169% for everything sized relative to body. Everything under body still scales, because body inherits the root size - so nothing is lost by moving it up, and uiFont.js sends only the font-size marker class to the root while the font-family and colour rules keep matching on body, where their form-control selectors live. rem, not px and not vw: px cannot follow the setting, and vw is what made elements resize with the browser window (fixed in earlier commits, deliberately). rem follows the root font size and nothing else, which is exactly the preference the user set. The report also says minicards are "approximately 7-8pt at 100% browser zoom". At the default root size a card title is 14px, and this commit does not change that number - what it changes is that the setting can now raise it. If cards still come out much smaller than the list heading above them, the board's own zoom control is the other thing that scales them, and it is not affected here. tests/listTypeScale.test.cjs reads rem as well as px (1rem = 16px at the default, so the pinned ORDER reads the same either way) and gains two checks of its own: that each of the three sizes is in a unit the preset can scale, and that the preset lands on the root element and only there. Verified by running that suite, tests/uiFonts.test.cjs and the whole node suite (376 suites, 0 failed). Not verified in a browser: this sandbox has none. Thanks to CCmesch and xet7 ! Fixes #6587. |
||
|
|
6420819cfa |
Clicking an open card closes it, and a focused checkbox is not a diamond.
The two newest comments on #6465. CLOSING BY CLICKING AGAIN was not a missing feature - it was an unreachable one. clickOnMiniCard already ended with } else if (Session.equals('currentCard', card._id)) { Utils.goBoardId(Session.get('currentBoard')); but the TITLE branch above it returns before that is ever reached, and a minicard's title covers most of the minicard. So the second click almost always landed in the title branch, which unconditionally re-opened the card that was already open. The toggle worked only if you managed to click a part of the card that was not its title, which is why two people asked for a feature that was already written. The title branch now asks the same question first, and closes the same way. A click on a card that is NOT open still opens it, and still clears the phone popup ids as it did. On a mini screen the card is a popup rather than a pane, so "already open" is a different question - `popupCardId` and `Popup.isOpen()` - and that path closes with `Popup.back()`. Multi-selection still short-circuits both, so ticking cards is unaffected. THE PROBLEMS PAGE GLITCH in the screenshot is the focus ring. The Admin Panel draws its checkboxes as a material square that morphs into a tick, and the tick IS a 40-degree rotation of the element. A browser draws its focus ring around the element as it is - rotated - so a checkbox that is both checked and focused, which is exactly what a checkbox you just clicked is, comes out as a blue DIAMOND where the tick should be. The ring is not removed: keyboard users need to see where they are. It moves to the row that contains the checkbox, which is not rotated - every one of these sits inside a label (problemsSummary.jade) - so it is a normal rectangle around the whole row, which is easier to see than a 13px box anyway. `:focus-visible`, so a mouse click does not leave a ring behind. tests/cardClickToggle.test.cjs pins that the close decision comes before re-opening (or it never happens), that opening a different card and the existing non-title toggle both still work, that multi-selection still wins, that the tick is still the rotation, and that the label nesting the ring relies on is really there. Thanks to csonkaoszimt, Heart1010 and xet7 ! |
||
|
|
8456170d45 |
Dragging a card down scrolls the list, not the whole board.
"With v6 i was able to move a Card downwards by drag & Drop. Upwards is no problem, the Line scrolls automaticly up, but this does not work downwards. The whole Page/Site scrolls down and not ne Line" The card sortable's `sort` handler auto-scrolls at the edges. HORIZONTALLY it picks the lane under the pointer (#443). VERTICALLY it picked nothing: it always scrolled `.board-canvas`, which is `overflow-y: auto` and holds the swimlanes, rather than the `.list-body` under the pointer, which is `overflow-y: scroll` and holds the cards. Scrolling the canvas moves the whole board - which is the report, in the reporter's own words. The asymmetry is what makes it reproducible rather than vague. Dragging UP, the canvas is usually already at scrollTop 0, so computeEdgeScroll returned null, the handler did nothing, and jQuery UI's own `scroll` option - which acts on the placeholder's scrollParent, i.e. the list body - scrolled the list, which is why "upwards is no problem". Dragging DOWN, the canvas nearly always has room left, so the handler fired first and scrolled the board instead of the list. The list body under the pointer is now scrolled first, found with the same rectangle hit-test the lanes use, and the canvas only when the list cannot go further that way - so a drag down a long list scrolls the list, and a drag past the end of it moves on to the board, which is what dragging a card to another swimlane needs. The horizontal lane scroll is unchanged, and the list branch sets `scrolled` so the #6477 refreshPositions still runs after it: a manual scroll invalidates jQuery UI's cached geometry whichever element was scrolled. tests/cardDragVerticalScroll.test.cjs pins the order (list before canvas, canvas only when the list did not move) and runs computeEdgeScroll with real numbers for the three cases that decide it: a pointer in the bottom edge zone of a scrollable list, the same at the end of its scroll range, and a list that does not overflow. Thanks to markusst1982 and xet7 ! Fixes #6584, |
||
|
|
c687daadf4 |
Five controls that had drifted away from what they belong to.
The screenshots in #6465 (comment 5187985815, images only, each with the fault circled): "Checkbox is misplaced" - Admin Panel people table. The select-all box and the "all users" it labels were two loose inline nodes in a centred table heading: the box is replaced content with its own baseline, and at the width that column happens to have, it landed on the word. They are one <label for> now, an inline-flex row with a gap that cannot collapse - which also makes the word click the box. "This checkbox is crazy" - Member settings. The rescue-card-description row carried a `b ` spacer and `.left`, which is float: inline-start. A float inside a flex container is ignored and the spacer became a stray flex item, so the box drifted up beside the "Card settings" heading instead of sitting with its own text. It is now the same shape every other checkbox row in that file uses: .flex anchor, .materialCheckBox, span. "(2/5) <-- move this up here" and "Make this same height as the lanes left and right" - one cause, not two. The WIP counter is already inside the h2 right after the title; the title is a `+viewer`, and .viewer is display: block with a 22px min-height, so it pushed everything after it onto a second line AND reserved a band under it, which is what made that list's header taller than its neighbours'. Inline in the heading, the counter stays where the markup already puts it. Same treatment the quick-access header and the table view already give their viewers. "Please move the button down. This is too close ... panic ;-)" - the backup schedule's Save sat directly under the 1..28 day buttons, close enough to hit while aiming for a date. The gap goes on the form-group that FOLLOWS the day grid, so it applies where that grid is and nowhere else. "The alignment is out of place" - the attachment move button. This one is normalisation rather than a measured fix: the row is align-items: flex-end, so a margin of the button's own offsets it from the controls it acts on; that margin is zeroed and the button aligns with the controls explicitly. Whether that is the whole of what was circled needs a browser, and the test says so. tests/uiSpacingReports.test.cjs pins each cause, including the premise behind the WIP fix (.viewer really is a 22px block). Six of its nine assertions fail on the previous commit; the three that pass there are the premises, which is the point of stating them separately. Not verified in a browser: this sandbox has none. Each fix is read off the markup and CSS against what the screenshots show. Thanks to Alishara and xet7 ! |
||
|
|
a95451c67b |
Board type scale: a list heading outranks its cards again.
Reported by email with a screenshot: the "Add card" link and the "Add" button are too big, and things should be sized in relation to each other the way an h1 is bigger than an h2. The measurements agreed. A list heading was 14px, while a minicard title and the "Add card" link both set no size at all and inherited the document's 16px, and the composer's Add button was a 50px-tall slab. So the column was labelled in fine print, the affordance for making a card was as loud as the cards themselves, and the biggest thing on screen while typing was a button. The scale is now heading 16 > card title 14 >= add-card link 13, each stating its own size instead of inheriting, and the Add button is a 34px control rather than a slab. Mobile keeps its own larger sizes - the .mobile-view rules with !important, and the @media blocks - because a phone is read at arm's length. tests/listTypeScale.test.cjs pins the ORDER rather than the numbers, since that is what "in relation to each other" means, plus that each of the three states a size of its own: an inherited size is exactly how the link and the card title both landed on 16px, level with each other and above their heading. It reads the base scale only, skipping @media blocks, and takes the LAST rule for a selector - .list-header .list-header-name has two rules, and reading the first one finds the one that sets no size at all. Verified against the previous commit: heading 14, card title and add-card link unset, button 50px - it fails on all four counts. Not verified in a browser: this sandbox has none. The sizes are read from the source, and the relative order is what the guard holds. Thanks to xet7 ! |
||
|
|
c6b0af16eb |
Card drag no longer resizes every list, and EVERYTHING runs every check.
#6573: picking up a card made every list on the board expand horizontally to fill the window, and dropping it snapped them back, which makes landing a card in the intended list a guess. Two correct changes met. A list's custom width is an inline --list-width custom property, and what turns it into a width is a rule in list.css whose selector needs an ancestor: .js-swimlane, .dragscroll, or a swimlane-<id> id. In lists view the container is .swimlane.list-group.js-lists.dragscroll - no js-swimlane class, no such id - so .dragscroll was the only one of the three that matched, and every list's width there hung on that one class. #6558 then taught a card drag to stop the board panning under the same pointer, and it does that by REMOVING the dragscroll class for the duration of the drag. So the drag deleted the class the width rule matched on: flex: none and the width declarations switched off and the lists re-flowed, for exactly as long as the drag lasted. It also explains the workaround in the report - dragging one list's edge first sets that list's width through the resize path, so that column stopped jumping while the others did not. A layout rule may not hang on a class that an interaction removes. .js-lists is on the container in both views and nothing takes it off, so the width rules, their mobile-mode counterpart and the resize rules name it now. tests/listWidthDuringDrag.test.cjs pins that every width rule still matches in lists view with dragscroll gone - it fails on the previous CSS - and pins the premise that suspending the pan really does remove that class. build.sh -> Tests -> EVERYTHING is what a release is tested with, so a check that is in the Tests menu and in no whole-run is a check that runs when somebody remembers it. The floating-promises guard was that: menu entry 12, in no run. It is the first of four stages now - seconds, so an unawaited permission check is reported before an hour of browsers - and its return code is in the verdict like the others. What runs there is checks only: the menu entry may install ripgrep and the @typescript-eslint packages and write the rule into .eslintrc.json, which is a person setting the guard up, while EVERYTHING runs unattended and must modify nothing - a run that rewrites .eslintrc.json is no longer testing the commit it started from. The two checks are one shared function using grep rather than ripgrep, so they also work where nothing may be installed. build.bat ran the three browsers as one Playwright invocation into one wekan-alltests-browsers.log, where neither "which browser failed" nor "what did WebKit print" was answerable afterwards, and CLAUDE.md's "check the newest test logs" names the per-browser files. It starts chromium, firefox and webkit as three jobs with a log, a status and a summary row each now, with a per-browser --output because Playwright clears its output directory at startup. EVERYTHING is not reimplemented there: Windows hands the run to releases/run-everything.sh, which calls build.sh --run-everything, so the new stage arrives on both platforms at once. The parity guard pins all of it, including that the shared checks install nothing. Verified without node or meteor, which this sandbox has neither of: the extracted checks were run for real against the tree (clean) and against fixtures with an unawaited auth call, a missing rule and no .eslintrc.json at all (all three fail as they should); the new and changed guards were ported assertion-for-assertion to Python and run against the same files, including that the #6573 guard fails on the pre-fix CSS; build.sh passes bash -n and every build.bat call now resolves to a label. Thanks to yulqen and xet7 ! Fixes #6573, |
||
|
|
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 ! |
||
|
|
7d9a2e3037 |
A filter no longer leaves a spinner turning over an empty list, and a half-arrived card is not drawn as a blank box.
Two problems from one report with screenshots, both in how a list decides what to
draw at its bottom edge.
1. "ONCE A FILTER IS APPLIED FOR A MEMBER, THE 3 DOTS CONTINUE TO ANIMATE." The
screenshot shows a list with NO cards under the filter and the load-more spinner
still turning under it - and `_updateList` raising the window limit by ten every
idle callback for as long as it stayed on screen.
The spinner asked "does this list hold more cards than the window I asked for?"
and answered it from a total built somewhere else than the cards being drawn. The
cards come from the filtered selector; the total came either from
`list.cards(swimlaneId).length` or, in lazy card-loading mode, from a count
document published per list/swimlane - whose id was `listId::swimlaneId` and did
NOT include the filter. So changing the filter re-subscribed with a new selector
under the SAME document id, two publications wrote one document, and Meteor's
merge box serves whichever subscription it prefers, which during the changeover is
the older, pre-filter one. The list drew its empty filtered window while its count
still described the unfiltered list.
The count document now carries a short stable key for its selector, so each filter
counts into its own document and a count can never describe another filter's
cards. Both subscribers pass it; the two-argument form still returns the old id
for a caller with no selector to hand.
And the spinner no longer depends on that being right. There is nothing more to
fetch unless the window came back FULL: if we asked for twenty cards and got
three, those three are all there are, whatever any count says. That holds in both
card-loading modes and for a stale count in either direction, which is why it is
worth asking as well as the total.
While there: showSpinner asked `isLazyCards()` with no board while cardsWithLimit
asked `isLazyCards(list.boardId)`, so the two could take different branches for
the same list. Both ask about the board now, and both build the selector the same
way instead of from different sources - that disagreement was the bug.
2. "RANDOM BLANK CARDS ARE APPEARING ON THE BOARD." White minicards with the
handle icon and nothing else - no title, no members, no labels - mixed in among
the real ones. In the screenshot the only two that render are the two carrying the
viewer's own avatar.
A minicard renders blank when its document is in minimongo without its fields:
`Cards.getTitle()` returns null for `title === undefined`, and every badge is
conditional on a field that is not there either. That is NOT a card with an empty
title - the schema declares `title` as optional with `defaultValue: ''`, so a card
that went through it has the key, `''` at worst. A document without the key at all
is a partial replication, and several publications ship cards with a projection:
`openCardData` publishes `{ _id: 1 }` as the parent of its children cursors, the
search publications ship their own field lists, and minimongo merges what every
live publication says about an id.
WHICH of them produced these particular stubs is not settled - it needs the
running board to catch - so this is a guard where the card is drawn rather than a
fix at the source: a document that does not carry the field the minicard is built
around is not drawn. `$exists` is what separates the two cases; filtering on a
falsy title would hide real cards. It cannot hide a card, and when the full
document arrives the card appears, which is what the blank box was standing in for
anyway.
tests/listCardWindow.test.cjs covers the reported case (a filter empties the list
and the total still says 25), a short window in general, that a full window with
more behind it still offers to load more, a stale total in both directions,
missing input, that an empty title is still drawn while a missing one is not, that
the selector stays flat and an existing `title` clause is not silently replaced,
that two filters no longer share a count document while the same filter always
names one whatever order it was built in, and that every subscriber names it the
same way.
Thanks to xet7 !
|
||
|
|
c185f5e982 |
Moving a card no longer pans the board at the same time.
On a board large enough to have scrollbars in both directions, dragging a card sometimes moved the card, sometimes scrolled the list, sometimes scrolled the board, and often several of those at once, so the card could not be dropped where it was aimed. A board runs three drag-scroll implementations over the same pointer: the dragscroll library, bound separately to `.board-canvas`, to every swimlane and to every lane; the `mousedown .board-canvas` lane pan in swimlanes.js; and jQuery UI sortable, which is the one that is supposed to move the card. Nothing stood any of them down while a drag was in progress. swimlanes.js did try, for list drags, but called `dragscroll.reset()` FIRST and removed the class afterwards - reset() binds to whatever carries the class at that moment, so the listeners stayed - and it left the canvas tagged anyway. The lane pan ignored the `nodragscroll` marker the library honours, so pressing a minicard, which carries that marker exactly because it is the card's drag handle, started a horizontal pan that ran alongside the card drag. Now client/lib/boardDragscroll.js suspends drag-scrolling for the whole drag - class off, THEN reset - and restores exactly the elements it took it from, so a board route does not gain panning it deliberately turned off. Every sortable on the board (cards, lists, swimlanes) suspends in start and resumes in stop, a window mouseup/touchend/dragend restores in case a drag never reaches its stop handler, and a swimlane re-rendered mid-drag does not re-arm panning under the pointer. The lane pan now refuses to start on `.nodragscroll` or on a drag handle, and gives way if a drag begins after the press. The drag handles themselves are marked `nodragscroll`: a press on a handle moves the item, it never pans the board. tests/boardDragScrollDuringDrag.test.cjs pins the order of the two steps, the restore-what-was-suspended rule, the safety net, the suspend/resume in every sortable and the two markers; specs/37-card-drag-sort.e2e.js drags a card sideways on a 12-list board and pins that neither the lane nor the canvas scrolls while it moves, and that panning is back afterwards. Thanks to mueschel and xet7 ! Fixes #6558, |
||
|
|
c5d13889b6 |
Fix #6465: the three UI bugs reported today - checkboxes, WIP limit, sidebar rows.
WIP-LIMIT POPUP: "the checkbox can not be unchecked and the counter always falls
back to 1". One cause for both. models/lists.js getWipLimit() read the list back
through `ReactiveCache.getList(this._id)`, and on the SERVER that getter is
ASYNC - it returns a promise, and a promise has no `wipLimit` - so the helper
answered 0 for every option, every time. `enableWipLimit` therefore saw value 0
and reset the limit to 1 on every click, and toggled `!enabled` where `enabled`
was always 0, so every click turned the limit ON. The document is `this`, so the
server needs no lookup at all - and a toggle wants the state as it was when the
click happened, not after its own write. The client keeps the lookup: it is what
makes the popup's tick and number follow the change. Apply now also refuses a
limit that is not a usable number instead of sending NaN, which passes
`check(limit, Number)` and dies in the schema with nothing to show the user.
ADMIN PANEL / ATTACHMENTS CHECKBOXES: every checkbox on those panes - Backup's
three, each storage's Enabled and Read, the S3 path-style flag, the avatar-upload
block - drew as a grey rotated RECTANGLE instead of a green tick. They were
native `<input type="checkbox">` styled into WeKan's material checkbox, which
needs the browser to drop its own rendering for `appearance: none`; where it does
not, the geometry applies and the colours do not, which is exactly that
rectangle. They are `.materialCheckBox` divs now, the same markup as the rest of
WeKan, with no native rendering to lose. Two of them could not be unchecked for a
second reason: their state was written as `checked="{{filesystemRead}}"`, a
quoted STRING - and `checked="false"` is checked in HTML.
SIDEBAR CHECKBOX ROWS: "checkboxes and text don't fit well". A row is
`a.flex > i.fa + span`, and `.flex` is only `display: flex` - no alignment, no
gap - so the box glyph touched the first letter of its label and sat on a
different line from it. `align-items: center` and a 6px gap, with a fixed glyph
width so every row's label starts at the same x whether its box is a square or a
tick.
tests/wipLimitPopup.test.cjs and tests/adminAttachmentCheckboxes.test.cjs pin
all of it.
Thanks to Alishara and xet7 !
Fixes #6465,
|
||
|
|
3487d2519d |
One icon set: Font Awesome. The Grey Icons feature is removed.
WeKan used colourful Unicode emoji as its icon set in 8.00-8.24 only; before and after, the icons are Font Awesome 4.7. A handful of emoji had survived that change - every notification type, the board star, the vote-against thumb, the spent-time badge, the reaction and add buttons, the list width toggles, the bookmarks star, the back arrow, the custom-field pencil, the notification bin, the sidebar's plus and hash, the four date badges in cardDate.css and minicard.css, the mobile drag handle, the multi-selection tick, and the gantt day markers. Each of those is a different picture on every platform, at a size and colour the stylesheet does not control. They are Font Awesome glyphs now: either an `i.fa` element, or the codepoint (`content: "\f11e"`) with the font named, since `time::before` is not an `.fa` element. The helpers that produced an emoji return a class name instead, and their templates render an `<i>`. "Grey Icons" in Member Settings existed to grey exactly those emoji. It ran a MutationObserver over every rendered subtree, for the whole session, wrapping any text node that was one of ~50 emoji in a span it could greyscale - and only 13 of those emoji were still anywhere in the app. With them gone it has nothing left to find, so the feature is removed whole: the menu entry, the click handler, the `toggleGreyIcons` method, the `hasGreyIcons` helper, the `profile.GreyIcons` schema field and its published-fields entry, the `userGreyIcons` publication and its subscription, unicode-icons.js/.css and the feature import, twelve `body.grey-icons-enabled` CSS rules across six stylesheets, the `grey-icons` string in all 147 language files, the field in public/api/wekan.yml and wekan.html, and the two mentions in docs/DeveloperDocs. The language flags in the language picker stay: Font Awesome 4.7 has no flags. tests/fontAwesomeIcons.test.cjs fails on an emoji in any template or any CSS `content:`, checks the date badges name the font and use the four codepoints, checks the icon-producing helpers return class names, and checks that no part of the removed feature is left anywhere. Thanks to xet7 ! |
||
|
|
3c5c0a16a5 |
A subscription with no board id took the server down. It is answered, not fatal.
From the dev server log:
Match error: Expected string, got null
at Subscription.<anonymous> (server/publications/boards.js:481)
SyncedCron: Fatal error encountered (unhandledRejection)
=> Exited with code: 1
`publishComposite('board')` starts with `check(boardId, String)`. A subscription
arrives with a null board id, check() throws, and a throw inside an ASYNC
publisher escapes as an unhandled promise rejection - which this app treats as
fatal and exits on. So one bad subscription stops the server for everyone, and
the arguments come from the client: any client can send it, logged in or not.
The app was in fact sending it itself, from a popup that read
`Session.get('currentBoard')` on a page that has no current board.
Both halves are fixed. The publisher TESTS its arguments instead of checking
them: a subscription that names no board publishes nothing (publishComposite
treats a falsy return as "no publications" and readies the subscription), so the
client gets an empty result and the process stays up. The same guard is on
`boardCardsWindow` and `boardCardsLoadingMode`, which are async publishers with
the same shape. And the client no longer sends a subscription for a board id it
does not have - the popup's Session read, two <select> values, a new board id
that may be undefined when the insert failed, and a template container with no
linked board.
tests/publicationArgumentGuard.test.cjs replays the guard for null, undefined,
empty string, a number and a selector object, checks the guard runs before the
publisher touches the id, and fails on an unguarded board subscription in the
client file this came from.
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 ! |
||
|
|
2973240a7f |
Clicking a card closes the one that was open; keeping many open is a setting.
Opening a card APPENDED it to the open-cards list, so the card that was already open stayed open behind the new one - which the reporter saw as soon as the new card was dragged: the old one was still sitting there. Clicking another card means "show me that card", not "show me both". A click now opens THAT card and closes the previous one. Both ways of opening a card - the minicard and its title - go through one helper, so neither path can drift from the other again. Keeping several cards open at the same time is still possible, as the per-user setting it should always have been: Member Settings / "Open many cards at once", off by default, stored as `profile.openManyCardsAtOnce` and toggled by a server method like the settings beside it. A reader who is not logged in gets the default rather than an error. tests/openManyCardsAtOnce.test.cjs replays the decision in both states and guards the wiring: schema, helper, method, menu entry, check mark and translation. Thanks to mimZD and xet7 ! Fixes #6531, |
||
|
|
df27e349d9 |
Mobile mode: the Add List + no longer opens the list as well.
Regression from moving Add List into the mobile list header in
|
||
|
|
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
|
||
|
|
61979c0f6c |
Mobile mode: Add List moves into the list header, no row of its own.
On a phone the "+ Add List" composer stood as a row above the lists, spending a whole
row on one button. The + now sits in each list header, BETWEEN the caret and the drag
handle, so the caret moves left and the + takes the middle of that group.
This is what desktop already did. #6465 moved Add List into the list header there and
left the mini-screen path alone, so the two had drifted apart. The mobile button now
uses the SAME class (js-add-list-here), therefore the same click handler and the same
behaviour - open the inline composer after this list - and the same Font Awesome icon,
fa-plus-square-o. One button in two layouts rather than two lookalikes that can drift
again.
The mobile list-header grid grows from four columns to five: title, caret, +, handle.
RTL mirrors on its own. Nothing here is placed with a physical left/right: the header
is a CSS grid, and a grid lays out along the INLINE axis, so under dir="rtl" column 1
is on the right and the whole row reverses - handle, +, caret, title. A test asserts
no physical side creeps into any of the three placements, since one `right:` would
strand a control on the wrong edge.
An empty swimlane and an empty board keep a + of their own, as on desktop: there is no
list header to host the button when there are no lists, and without it the first list
could never be created.
The addListForm template is removed. It rendered that standing row, mobile mode was
its last caller, and it is dead once the button moves. Its three handler blocks go
with it - a Template.X.events() left on a removed template throws at MODULE LOAD and
takes out every module after it in the client bundle, which is how the password field
disappeared from /sign-in 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 !
|
||
|
|
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 !
|
||
|
|
5a1a661e01 |
Make the drag-handle toggle work on touch screens, and free the card body for panning.
"Show desktop drag handles" did nothing on a touch screen. The rule was isTouchScreenOrShowDesktopDragHandles() = isTouchScreen() || preference so on touch the OR was already true and the toggle could never hide the handles. Every place that decides whether to render a handle - minicard, list header, swimlane header - and every sortable handle selector goes through that one helper, so the setting was inert on exactly the devices that show handles. The setting is now THREE states, not two: on, off, and never-chosen. An explicit choice always wins (including OFF on a touch screen); only when the user has never chosen does the device decide, and then a touch screen still gets handles by default, because a finger needs something to grab. The rule lives in the pure models/lib/dragHandles.js so it can be unit-tested, and the toggle now stores a real `false` instead of removing the setting - that is what lets "turned off" be told apart from "never chosen". toggleDesktopDragHandles takes the explicit new state from the client (which alone knows whether this is a touch device) and still accepts no argument for older clients. Handles also decide what a DRAG MEANS, and that half was broken too: `.minicard` and `.list-header` carried `nodragscroll` unconditionally, so with handles ON a finger dragging across a card neither moved the card (only the handle does) nor panned the board (dragscroll was opted out) - it did nothing. They now opt out only when handles are OFF, i.e. only when the element IS the drag source. With handles on, the card body pans the board, which is the whole point of having handles. And the handle has to be reachable with a finger: it was a 20-28px icon in the bottom-right corner, a mouse-sized target that is close to unusable on a wall-mounted infoscreen. On a coarse pointer it becomes a 48px full-height strip down the leading edge (the Material minimum, and the easiest edge to thumb), with the card content padded to match. A mouse keeps the compact corner handle, since `pointer: coarse` does not match a mouse. Tab order: the keyboard card/list move buttons are focusable but `opacity: 0` and sit at the START of the card content, so tabbing went card (visible focus) -> invisible -> invisible -> next card and the focus ring kept vanishing and reappearing where it looked like it had gone backwards. They are now revealed while focused, the same pattern the skip-to-content link already uses. Adds tests/dragHandles.test.cjs: the three states, that an explicit OFF hides handles on touch (the reported bug), that an explicit choice always beats the device default, and that a corrupt stored value falls back to the device default rather than leaving a finger unable to drag. Thanks to xet7 ! |
||
|
|
99e04ec98a |
List header card count: scope to the rendered swimlane, not the list's own swimlaneId.
A SHARED list (empty swimlaneId) renders under every swimlane. cardsCount() scoped the count by `list.swimlaneId`, which is '' for a shared list, so every swimlane showed the whole-list count while the cards rendered below were swimlane-scoped — e.g. "5 Cards" over an empty second swimlane. The card body already scopes by the container swimlane via listBody.jade `idOrNull ../../_id`; cardsCount() now takes that same `../../_id` (passed from listHeader.jade) and prefers it over the list's own binding, so the header count matches the cards actually rendered in that swimlane. Still gated to swimlanes view (lists view keeps the whole-list count), and both list.cards(id) and lazyListCardCount(id) already scope by the passed swimlane id (incl. first-swimlane shared/orphaned surfacing), so the count is correct in both eager and lazy (#6480) modes. tests/cardsCountSwimlaneScope.test.cjs guards the wiring; the per-swimlane card set is covered by server/lib/tests/selectAllSwimlane.tests.js. Thanks to xet7 ! |
||
|
|
11cb336161 |
Fix #6511: board shows no cards / "Bad index in range.removeMember" — add a unique _id sort tiebreaker.
The board card list is a Blaze {{#each}} over a LIMITED, ordered reactive cursor
sorted by `{ sort: 1 }`, which has TIES. When several cards share the same `sort`
value (or the same due date, etc.), their order is non-deterministic across
observe/poll cycles, so Meteor's diffQueryOrderedChanges computes an out-of-range
index and Blaze throws `Bad index in range.removeMember: 0`. That aborts the #each,
so the board renders NO cards (and cascades into the `undefined.remove()` teardown
error). An index-backed board card query (a recent fix) can change the tie order and
expose this.
New pure, tested helper models/lib/cardSortTiebreaker.js appends a UNIQUE `_id` key
as the final sort key (object and Meteor array forms; idempotent), making the total
order deterministic so the ordered diff is always well-defined. Applied in
client/components/lists/listBody.js (cardsWithLimit — the crashing #each, before both
the window subscription and the client cursor) and server/publications/cardsWindow.js
(the published limited window, so "first N cards" is stable between polls).
Test: tests/cardSortTiebreaker.test.cjs. Likely also resolves the same
range.removeMember "no cards" reports on other backends.
Thanks to mueschel and xet7 !
Fixes #6511,
|
||
|
|
533edca7dc |
Add-card: pressing Tab no longer loses the typed card text (#1195).
The add-card form's Tab handler (Template.addCardForm pressKey, keyCode === 9) is a deliberate power feature -- Tab jumps to the NEXT column's add-card form so cards can be added across columns quickly. But it opened that next form while abandoning whatever was typed in the current one, so pressing Tab mid-entry silently lost the card text (the card appeared to 'move to the next column' with no content). It now submits the current card first, but only when the textarea has non-whitespace content (so Tab in an empty box does not create a blank card), then jumps to the next column's form -- preserving both the content and the column-jump feature. Tests: tests/addCardTabSubmit.test.cjs (4 checks) guards the ordering -- the Tab branch reads the textarea, submits on non-empty content BEFORE openForm of the next list, still opens the next column, and does not submit for an empty box. Thanks to callahad and xet7 ! Fixes #1195, |
||
|
|
2328bcd0f1 |
Case-insensitive '@' member autocomplete (shared, null-safe).
Follow-up to the #5116 label fix: the add-card-title '@' member mention in client/components/lists/listBody.js matched with user.username.indexOf(term) === 0 -- case-sensitive, prefix-only, username-only, and it threw when ReactiveCache.getUser() returned null. So '@ann' did not suggest 'Anna', '@Anna' did not match username 'anna', and a full-name search never matched. The card description/comment editor (client/components/main/editor.js) already matched case-insensitively on username OR full name but shared no code and had the same null hazard. Both now route through a pure, unit-tested models/lib/memberAutocomplete.js (memberMatchesTerm / filterMembersByTerm) that lowercases the term and matches username or profile.fullname as a substring, and is null-safe. Tests: tests/memberAutocompleteMatch.test.cjs (11 checks) covers case-insensitive + substring + full-name matching, empty-term-shows-all, null/undefined user (the old crash), missing profile, order preservation, and source guards that both '@' call sites use the shared matcher. Thanks to rjl9 and xet7 ! |
||
|
|
728cd929cd |
Case-insensitive '#' label autocomplete in the card title.
Typing '#test' in the add-card / edit-card-title field did not suggest a label named 'Testing': the label search matched with a case-SENSITIVE label.name.indexOf(term) (and label.color.indexOf(term)), so only '#Test' matched 'Testing'. The board's '@' member autocomplete already matches case-insensitively; this brings the '#' label autocomplete in line. Extracted the match into a pure, unit-testable models/lib/labelAutocomplete.js (labelMatchesTerm / filterLabelsByTerm) that lowercases both the term and the label name/color, mirroring the other models/lib pure helpers. Tests: tests/labelAutocompleteMatch.test.cjs covers the exact #5116 scenario (#test -> Testing), color-fallback matching, empty-term-shows-all, order preservation, and negatives (non-substring, missing name/color, null label, non-array), plus a source guard that listBody.js routes through the shared matcher. 11 checks pass. Thanks to rjl9 and xet7 ! Fixes #5116, |
||
|
|
96c7faa872 |
Adaptive card loading: auto-lazy for big boards, no admin toggle (#6480)
Card loading is no longer an admin-configurable toggle. WeKan decides
per board by size ('auto', the default): a board over the threshold
(default 500 cards, CARDS_LOADING_LAZY_THRESHOLD) loads only visible
cards via windows; smaller boards keep loading all cards (unchanged,
fully featured). The server computes the mode per board and publishes it
(boardCardsLoadingMode -> boardCardLoadingModes) so client rendering
agrees; isLazyCards is now per-board.
Lazy windows now publish comments/attachments/checklists/checklistItems
with ONE cursor per window instead of one per card (same N+1 fix as
eager mode), and an open card subscribes to its own live children
(openCardData) so it is complete even when outside/just-added-to a
window. Operators can still force CARDS_LOADING=all|lazy|auto.
Removed the Admin/Features card-loading dropdown; pure decision logic in
models/lib/cardsLoading.js (resolveCardsLoadingMode now defaults to
'auto', plus effectiveBoardCardsMode + threshold) with updated unit
tests. New i18n key cards-loading-auto across locales.
|
||
|
|
46924985f8 |
Soft delete for lists: delete = mark, restorable + undoable (#1023).
Deleting a list no longer destroys it. The list and its cards are marked (deletedAt/deletedBy/deleteBatchId), hidden from the board, recorded as a reversible delete in history, and restorable via lists.restore or Ctrl+Z. This is the first slice of "no permanent delete in ordinary use": physical removal is limited to GDPR/account erasure and a Global-Admin purge gated by a new Admin Panel / Features / Delete "Enable permanent delete" toggle (off by default). - models/lib/softDelete.js: pure notDeleted/softDeleteSet/restoreModifier/ canPurge helpers (+ tests/softDelete.test.cjs, wired into test:unit:node). softDeleteSet omits falsy actor/batch and restore uses $unset so no null is ever written to a Date/String schema field. - enablePermanentDelete feature flag (models/lib/featureFlags.js) + Settings schema field. - deletedAt/deletedBy/deleteBatchId schema fields on Lists and Cards (optional, no null default -> absent means live). - board/swimlane list render paths filter deletedAt: null. - server/models/lists.js: shared softRemoveList() + lists.softRemove / lists.restore / lists.purge (purge gated on canPurge = isAdmin && flag); client delete handler and REST DELETE now soft-remove. - userPositionHistory undo()/redo() handle actionType delete/restore via a batch-consistent _applyDeleted() helper. Design + planned rollout (other entities, Recycle Bin, admin Delete category table with GDPR data classes) in docs/Features/Undo/Undo.md. |
||
|
|
765d04bf7c |
#6465: Add List as a per-list header button + inline composer, not a standing column.
Swimlanes/Lists views no longer render a permanent Add List composer column. Each list header now has a far-right add-list button; clicking it opens the Add List composer as a column immediately AFTER that list in the DOM - which appears to the right of the list in LTR and to the left in RTL (the lists lane is a flex row that mirrors under dir=rtl). An empty swimlane/board shows the composer at the start so the first list can still be added. - new always-open addListInline template (title input + save + close), submit -> createListAfter (afterListId = the clicked list, swimlaneId = the displayed swimlane recorded from the DOM by the header button). - Session 'wekan-add-list-after'/'wekan-add-list-swimlane' drive which list the composer opens after; isAddListAfter/swimlaneHasNoLists/boardHasNoLists helpers. - leading +addListForm removed from the non-mini swimlane and listsGroup branches; mini-screen path unchanged. First cut - desktop/main views; needs live verification of styling, RTL and the empty-board case. Thanks to csonkaoszimt (report) and xet7. |
||
|
|
6d5a594b07 |
Fix #6477: card drag between swimlanes broke when lists are long/overflowing.
Dragging a card from one swimlane to the SAME list in another swimlane dropped it back in the source swimlane, especially with long overflowing lists. The card sortable's sort handler auto-scrolls the board (#443) via .js-lists scrollLeft / .board-canvas scrollTop, but jQuery UI sortable caches container/item geometry at drag start and only re-caches on its own placeholder moves - never on our manual scroll. Long lists are exactly what triggers auto-scroll, so the drop resolved against a stale geometry map and the stop handler's ui.item.parents('.swimlane') persisted the wrong swimlane. Re-cache positions with sortable('refreshPositions') whenever the sort handler actually scrolled - complementing the #2769 DOM-mutation refresh in listBody.js, which does not fire on scroll. Source-guard test tests/cardDragSwimlaneScrollRefresh.test.cjs. Thanks to mueschel (report) and xet7. |
||
|
|
2c23273c11 |
Fix #443: auto-scroll the board while dragging a card to an
off-screen list. The horizontal auto-scroll in the card sortable targeted .board-canvas, which stopped overflowing horizontally when the swimlane layout made the .js-lists lane the horizontal scroller - scrollLeftMax was always 0, the guard compared 0 < 0 and never fired, and ui.helper[0].offsetLeft -= 15 assigned a read-only property. Edge-proximity auto-scroll now drives the lane actually under the pointer (axis-agnostic, clamped, overshoot-safe helpers in imports/lib/boardAutoScroll.js), with vertical scrolling kept on the board canvas. Tests: tests/boardAutoScroll.test.cjs (15, positive and negative, including a reproduction that the old no-overflow target can never scroll). Closes #603: obsolete - the stale-drop-target cause was removed by |
||
|
|
7c0ae509ac |
Fix #2769 #1992 #2292 #2494 #1853 #1554 #2306 #1437.
- #2769: refresh drag geometry when the DOM changes mid-drag - cards no longer drop into the wrong swimlane while someone adds a card. - #1992: board import restores all five card date fields (and creator) with fallbacks; receivedAt/endAt were never imported at all. - #2292: archiving a swimlane archives its cards (mirroring lists); restore brings back exactly the cards archived with it. - #2494: client noCache card lookup returned a Promise since the Meteor 3 port - multi-select board moves wrote sort: NaN everywhere. - #1853: subtask "View it" falls back to the subtask's boardId when the deposit board is not loaded, instead of silently doing nothing. - #1554: restore the reactive dependency lost in |