mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
v10.49
3649
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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, |
||
|
|
c1bb2a6a50 |
Fix #6556: the SWC helper fix was deleted by the bundler, because the package says it may be.
10.45 still failed in Yandex Browser with the same
"Cannot find module '@swc/helpers/_/_possible_constructor_return'". The previous
fix was in that build and did nothing.
`@swc/helpers` declares `"sideEffects": false`. That is a promise to the bundler
that importing one of its modules changes nothing observable, so an import whose
bindings are never READ may be removed entirely - and
import '@swc/helpers/_/_possible_constructor_return';
is exactly that. Every line of the file was dropped, the package subdirectory was
never pulled into the bundle, and the legacy module tree came out as before. The
fix compiled to nothing and looked like it had been applied.
Every helper is now imported BY NAME and read: they are collected into an array
whose length is written to `window.__wekanSwcHelpers`. That is an observable
effect, so no optimizer may remove the imports that feed it - and the global is
useful on its own, because in a browser that fails this way again it says in one
word whether the helpers reached the bundle at all.
The `_/` path is what is imported, not `esm/`, because `_/` is what the
transform's own imports resolve at runtime; Node's resolver would refuse it (the
package's `exports` map has no `./_/*`), but Meteor's module system resolves the
directory through its package.json `main`, which is what the legacy bundle does.
tests/swcLegacyHelpers.test.cjs now fails if a bare side-effect import comes
back, if any binding is imported without being read, if the array does not end
somewhere observable, or if @swc/helpers stops declaring sideEffects: false (in
which case this reasoning should be revisited rather than silently kept).
Thanks to zubzhaaaw and xet7 !
Fixes #6556,
|
||
|
|
75d193d58f |
Fix #6536 impersonate error, and #6538: say when ROOT_URL will send unusable email links.
#6536 - "Impersonate User doesn't work": nothing happened, and the log said "Match error: Expected string, got null". The popup calls the server with the id from its data context, and when there is none it called with `undefined`, which arrives as null and fails the argument check. The client does not call at all without an id now, and says so in the console; the method marks its argument as audited (this app runs with audit-argument-checks) and then answers a missing id with "impersonate: a user id is required" instead of "Match failed", which named neither the method nor what was missing. isImpersonated got the same treatment. The impersonation itself is unchanged, including that only an admin may do it. #6538 - "Bad URL in Wekan mail": the invitation mail contained `http://127.0.0.1/b/...`. Every link WeKan sends is built from ROOT_URL, so when that is left at localhost the mail goes out with the SENDER's own machine in it - unusable for everyone who receives it, with nothing failing and no error to look at. WeKan says it once at startup now, naming the setting and what to set it to, for an unset ROOT_URL and for one pointing at localhost / 127.0.0.1 / [::1]. A warning, not a refusal: a single-machine install where localhost IS the address is perfectly valid. Thanks to ahlgrimma, BastienGraziani and xet7 ! Fixes #6536, Fixes #6538. |
||
|
|
e3f49bb268 |
Fix the legacy bundle missing an SWC helper it imports (Yandex Browser could not start).
WeKan 10.44 in Yandex Browser died at load with
Cannot find module '@swc/helpers/_/_possible_constructor_return'
An older browser is served `web.browser.legacy`, where SWC compiles classes down
to ES5 and emits imports of its own runtime helpers. Read out of the built
bundle: it contains `link("@swc/helpers/_/_possible_constructor_return", …)` -
the app asks for it - while the module tree beside it holds 22 helper
directories, and that is not one of them. The module system cannot resolve what
the code imports, so the bundle never finishes bootstrapping and nothing renders.
The order of the build is why. Meteor's scanner decides which files of an npm
package to include from the imports it can SEE, and these imports are written by
the SWC transform afterwards - so a helper that only the transform introduces can
be linked without being included. `_call_super` came in through another helper's
relative require and `_possible_constructor_return`, which nothing else requires,
did not. Exactly one was missing, and it was enough.
client/lib/swcHelpers.js imports the ES5 class/inheritance, iteration/spread and
async helper set from ordinary client code, which the scanner does see, and
client/main.js loads it first. Each helper is a few lines, so having the whole
set removes the class of failure rather than this one instance of it - the next
class written slightly differently would otherwise pull in the next helper
nobody imported.
tests/swcLegacyHelpers.test.cjs pins it: the helper from the report is there
along with its transform neighbours, every name resolves to a real subpath of the
installed package (a typo is a silent no-op at build time and the same crash at
runtime), and the file is imported before the styles and the app code.
The modern bundle was never affected - nothing there is transformed that far -
which is why this only showed in one browser.
Thanks to zubzhaaaw and xet7 !
Fixes #6534,
Fixes #6535.
|
||
|
|
4332677fbe |
The converted checkbox rows are rows, not full-height columns.
`.flex` is `display: flex; height: 100%`, which is right for a pane column and wrong for an anchor that is ONE ITEM of a row: it stretched to the row's height and pulled the box away from its words. The storage rows and the Backup include row now place their items - centred, only as tall as they need - whether the item is a label around a native checkbox or the material one that replaced it. Thanks to Alishara and xet7 ! |
||
|
|
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,
|
||
|
|
b46eecf58b |
Fix the 20 node suites the && chain had been hiding.
The new runner ran all 260 suites for the first time: 20 failed. Four were real
defects in the app, the rest were guards pinning a spelling or a design that had
since changed - each of them written when it was true, and none of them run
since, because npm stopped the chain at the first failure.
The app fixes:
* models/lib/themeAccents.js: accentOf('constructor') returned Object's
constructor - a FUNCTION - because a plain lookup answers from
Object.prototype. A board colour named after any prototype member would have
written a function into a stylesheet. Only the map's own keys are themes now.
* RTL: the dependency overlay and its connect handle each set a physical
left/right AFTER the logical property, so the physical one won and both were
pinned to the LTR side in an Arabic or Hebrew layout. The skip link, the
avatar's account badge, the stats value column and the theme-category label
were physical too. All logical now (inset-inline-*, text-align: start/end).
The guards, each corrected to what the code actually does now, with the reason:
* addBoardTileHeight, publicationArgumentGuard: a fixed-size slice
(jade + 3000, source + 1400) that a grown comment pushed the subject out of.
Both now take the whole block they are about.
* adminCheckboxStyle: the Grey Icons feature is gone; asserts its REMOVAL.
* boardsVisibilitySettings: the separator count was pinned at 3; the site-theme
picker group made it 4. Asserts the shape - one Save per section, none for
the picker that applies immediately.
* changelogFormat: "# Upcoming WeKan ® release" is a legitimate heading.
* dbConformanceWiring: the log directory honours WEKAN_LOGDIR now.
* domainTablePage: the default page is the app-wide 10, not 25.
* ferretdbOplogGating: the exec runs under the CPU launcher.
* leftMenu: peopleMenu takes the user (multitenancy option D).
* loginEmailPanesMoved: the board-member restriction is two checkboxes in
Organizations and Teams now; asserted there.
* mobileAllBoardsFit: the bell and the avatar are two rules with variants.
* narrowWindowLayout: the hamburger is the last button in the flow, not pinned.
* rulesApiTriggerNormalize: #6491 made a missing matching field mean "any
value", so the #2674 "can never match" case now matches - and removeMember
iterates assignees, not members.
* securityLog: the new-problems selector moved to models/lib/eventLogProblems.
* tablePage: the Cards report renders the page the SERVER named.
* tenantWiring: the site colour is read in two places; the autorun is the one.
* themeAccents: see above - the guard was right, the code was not.
* translationPane: the "no hand-written table" regex matched the +tablePage
include it also requires.
* uiDensity: admin table cells wrap in one td+th rule now.
* rtl: the dir attribute comes from a helper, `!important` is not part of a
value, and the scanner read CSS COMMENTS as declarations - the comment
explaining why `left: 50%` needs no RTL variant was reported as a violation.
Thanks to xet7 !
|
||
|
|
21300f5cb4 |
Say which database has which problem, in Admin Panel / Problems.
WeKan runs on MongoDB or on FerretDB v1 over SQLite, PostgreSQL, MySQL, MariaDB or SAP HANA, and each answers a broken query, a full disk or a refused login in its own words. Those words reached an admin as an opaque string: "Error 1064 (42000): You have an error in your SQL syntax" with no way to know which database said it, that it is FerretDB's bug rather than their data, and that upgrading FerretDB is the fix. models/lib/databaseErrors.js is the translation - pure, so it is unit-tested without a database: a message in, and out comes which database said it, what kind of problem it is, what it means, what the admin should do, and whether WeKan can do anything itself. Sixteen rules, every one of them a message a real database produced in the conformance runs or the documented wording of the condition: injection refused by FerretDB's SQL guard, the syntax errors of all four dialects, the two permission failures that stopped MySQL and MariaDB dead this week, authentication, disk full, connection limits, deadlocks (retried), lost connections (reconnected), timeouts, duplicate keys (which is an index doing its job, not a problem), unimplemented operations, and a handler the binary was not built with. server/lib/databaseProblems.js records them into a new `database` event stream, one per problem per minute - a database that is down answers every query - and watches Meteor._debug, which is where a database error surfaces without wrapping every call site in the app. Admin Panel / Problems has the pane, and its first column is the database that said it. Thanks to xet7 ! |
||
|
|
6c1d62cde0 |
Admin reports show the instance, not the admin's own boards.
Boards Report was empty while the Cards report beside it listed cards from thousands of boards. It published userBoardIds(this.userId) - the boards the ADMIN is personally a member of - and on an instance whose admin is not a board member that is nothing at all. Until the pagination fix the pane hid this: it rendered every board in minimongo, which the All Boards page had already put there. The Files report was scoped the same way, to the cards the admin can access. Both now cover the whole instance, like Cards, Broken cards, Rules, Impersonation and Recovery already did. The membership selector was what kept those two publications honest, so both gained an isAdmin guard at the top - boardsReport asked only for a logged-in user before - and both count methods count the same set they page. Files and Rules also name their page now, like the other reports: opening one card puts its attachments in minimongo and opening a rules editor puts that board's rules there, and neither belongs in a report page. The Files page is sorted by name - paging with no sort is paging over natural order, where a document can appear on two pages or on none - and that sort has an index now. Thanks to xet7 ! |
||
|
|
c1add5bc5e |
Paginate the admin lists honestly: one page of ten, index-backed.
Admin Panel / People showed the admin on every one of its 578 pages, and Admin Panel / Problems / Broken cards was one endless page under a pager that said "1 / 1". Same bug in two shapes: the pane subscribes to a publication that sends exactly one page, then reads the page back out of minimongo - which holds far more than the page. The logged-in user's own record is always there (accounts publishes it), and so is every card of every board the admin has opened. A plain find(query) cannot tell those apart from the page. So the server names the page. getPeoplePageIds returns the ids of the People page with the publication's own selector, sort and window; the Broken cards, Cards and Boards report publications send the ids of the page they just sent alongside it. Both panes render that list, in that order, and nothing else. Every paginated page in WeKan now loads ten rows at a time, from one constant - TABLE_PAGE_ROWS_PER_PAGE - including the pages that draw a pager of their own: the reports and event streams, the four People panes, Translation, the search pages and the archive. docs/Design/Page/Table.md records the rule and its two deliberate exceptions. And the counting behind those pagers is index-backed. Every count already asks the database for a count rather than fetching the rows, but several counted and paged on unindexed fields: People sorts users newest-first, so on an instance with 14000 users each page of ten sorted all 14000 first. Broken cards asks an $or over boardId/swimlaneId/listId/type, which uses no index at all unless every branch has one. The missing indexes are created at startup by the idempotent ensureIndex, so an upgrade adds them by itself. Thanks to xet7 ! |
||
|
|
0c9b7b7fa8 |
Fix popup spacing, aligned description columns, and board bar centering.
Every popup had 10px of empty space above its content that nothing in
popup.css asked for: peopleBody.css and translationBody.css each carried a
bare `.content-wrapper { margin-top: 10px }`, and `.content-wrapper` is not a
settings class - the only element in WeKan with that class is the scrolling
body of a popup. Removed, and the remaining gap is now 6px under the header
plus 12px of content padding = 18px, exactly the 18px beside the first row.
Change Visibility and Change Watch lay their rows out as three left-aligned
columns, so the icons, the names and the descriptions line up and the check
mark of the active row can no longer push its description out of line.
And the second header bar centers its items: symmetric block padding instead
of 7px above and none below, no top margin on the button groups, and a title
that centers on its own text - which is what made the board title sit high.
The sidebar hamburger has equal side margins, so it sits in the middle of the
space between its divider and the end of the bar.
Thanks to xet7 !
|
||
|
|
1f4bf0be13 |
Migrated images show in the card view again.
Reported after upgrading from WeKan 6 to 10.37/38/40: an attached image is
visible in board view, downloads correctly from the card, and yet the card view
shows an empty white box that cannot be maximized. Cards created AFTER the
upgrade are fine.
The card view does not look at the file; it looks at the flags Meteor-Files
writes at upload time:
if(isImage) img.attachment-thumbnail(src="{{link}}")
...
else span.attachment-thumbnail-text= extension
An attachment that came through a migration can arrive without them - no
isImage, and often no `extension` or `type` either - so it fell through to the
last branch and printed an extension that was not there: an empty box. The same
`link` in the download button worked, because a download needs no flag. The
viewer refused to open it for the same reason.
The kind of a file is derivable, and models/lib/attachmentKind.js is now the one
place that derives it: from the mime type where the document has one (in any of
the fields that have carried it over the years - type, mime, mime-type,
contentType, versions.original.type), and from the file NAME where it does not.
A flag the document states as true is believed, never contradicted; the name is
consulted only when there is no stated type, so a notes.txt that really is
image/png stays an image and does not also become text. The card gallery, the
"add cover" menu and the viewer all ask it, so a thumbnail that renders can also
be opened.
A startup repair (schema upgrade step `attachment-kind-flags`) writes the same
answer back to the documents, so the REST API, the exports and everything else
reading those flags agree with what is on screen. A file whose kind cannot be
told from either its type or its name is counted as unresolved rather than
guessed at.
tests/attachmentKind.test.cjs pins the rules - the reported case first - and the
wiring: 17 kinds derived from a name alone, mime beating a misleading name, a
name that must not be trusted to be a plain name (path separators, query
strings, dotfiles), the type read from each of the fields that carry it, and a
repair that writes exactly what is missing and nothing else.
NOT verified here: no server and no node in this environment, so the rules were
replayed against a model of the module rather than executed. That replay caught
three real mistakes in the first draft (a query string eating the extension, a
name overriding a stated type, and the repair rewriting a document that was
already correct), which are fixed.
Thanks to S0QR2 and xet7 !
Fixes #6532,
|
||
|
|
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 ! |
||
|
|
64c1f426ab |
The right sidebar starts below the header, in both modes.
Its upper part - the panel title, the tabs, the members row - was underneath the two header bars, so the sidebar appeared to start in the middle of itself. On a phone the sidebar is `position: fixed`, and it has to be: the board behind it is wider than the screen, so an absolutely-positioned sidebar pins to the far right of the BOARD and shows as a narrow strip. But fixed means "against the viewport", and it was pinned at `top: 0` - the top of the screen, which is where the header bars are. There is no number to put there. The header is the quick-access bar plus a board bar whose buttons wrap to one, two or three rows depending on the language and the window width; every fixed value would be wrong for some of them. So the header measures itself: client/lib/utils.js publishes its rendered height as `--wekan-header-height` and the sidebar starts at that. A ResizeObserver keeps it current, because the buttons re-wrapping does not fire a window resize; an orientation change and a window resize are handled too, and a missing header means 0 - the old behaviour - rather than a thrown TypeError. tests/sidebarBelowHeader.test.cjs pins the rule and the measurement, including that `top: 0` does not come back. 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 !
|
||
|
|
e2c6f04a23 |
The board bar's icons fit two rows, and a desktop-mode board is a desktop board.
The icons still took four rows - title, seven, three, hamburger - because the
rule that makes each button a flex item of the bar was in boardHeader.css, and
`#header #header-main-bar .board-header-btns-group { display: flex }` in
header.css has the same specificity and loads later. So the groups never became
`display: contents` and the whole set stayed one unbreakable item, which is also
why the hamburger after it got a row to itself. Same lesson as the button
metrics: this pair of files needs the rule in the one that wins.
Lists still stacked in desktop mode, because boardBody.css lays the whole canvas
out for a phone by WIDTH: `display: block` on the swimlane with `overflow-x:
hidden` on the wrapper, which makes every list a full-width row and drops the
"add list" form under the last list rather than beside it. That is mobile mode's
layout now. Desktop mode gets the desktop board on the same narrow window: the
swimlane is a flex ROW that scrolls sideways, so the lists run left to right and
the add-list form is the last item of that row - the right in LTR and the left in
RTL, since a row follows the writing direction rather than a hard-coded side.
tests/narrowWindowLayout.test.cjs pins both, including which file the contents
rule has to live in.
Thanks to xet7 !
|
||
|
|
75b5623274 |
Mobile mode is the phone layout; desktop mode is the desktop layout, on a phone too.
Five things from the same two screenshots, and one theme: what belongs to the MODE the user chose, and what belongs to the width of the window. The board bar's buttons still took three rows in desktop mode. The metrics were written in boardHeader.css, and Meteor loads client/components/boards/ before client/components/main/ - so at equal specificity header.css's `margin: 0 6px` won, and the 2px never applied. They are written in header.css now, with `!important` so `.mobile-mode .board-header-btn` (9px/21px of padding on every one of these buttons) cannot take them back either. 44px target + 2px each side = 48px: seven fit a 375px row, so eleven icons take two rows in both modes. The sidebar hamburger was pinned to the top right corner, beside the title, with the icons below it. It is the LAST button at the right of the last row now: in the flow, with an auto start margin, so it never covers a button and reads as what it is. The user avatar was cut in half in MOBILE mode only. Same cause as the buttons: the drag-handle toggle in the top bar is also a `.board-header-btn`, so mobile mode gave it 42px of padding for one icon - the width the avatar needed. It is sized for what it is now, in both modes. Lists stacked one per row in desktop mode. That layout is chosen by WIDTH (max-width: 800px), so a phone in desktop mode got the phone board: one list per row instead of lists side by side. The stacking rules are `body.mobile-mode` now - the same class the rest of the mobile board layout uses. The minicard's drag handle sat near the bottom of the card in desktop mode. The full-height thumb column is chosen by `pointer: coarse`, which is true of a finger whatever mode the user picked; in desktop mode the compact handle in the corner, under the menu button, is what belongs there. That block is scoped to mobile mode as well. tests/narrowWindowLayout.test.cjs follows all five, including that the button metrics live in the file that wins and that the mode-based rules are mode-based. Thanks to xet7 ! |
||
|
|
bb882cf421 |
The board bar's icons fit two rows on a phone.
Eleven icons took three rows under the title. Each button was ~20px of icon inside 10px of icon margin inside 6px of button margin - 52px of a 375px bar for 20px of icon - so five fitted a row. A 44px touch target with 2px between buttons is 48px each: seven fit a row, so the icons take two rows, and the first of those shares the title's row since the button groups are `display: contents` there. 44px is the minimum comfortable touch target, so this is as tight as it goes without making them harder to hit - one row would need 34px each, which is smaller than a fingertip. tests/narrowWindowLayout.test.cjs does the arithmetic: it fails if the metrics stop fitting eleven icons in two rows, or if the target drops below 44px. Thanks to xet7 ! |
||
|
|
88d776e212 |
The avatar lines up with the bell, and "My Boards" is back at the left.
The avatar sat above the bell and against the right edge of the screen. Its wrapper carries `top: -5px` - a leftover from the desktop bar, where the username sits beside it - which lifts it off the row's centre line, and `#header-user-bar` carries 10px of padding on each side, which is 20px of a 375px bar spent on nothing and is what pushed the avatar past the edge. Neither applies on a phone now. The chips I put behind the mode-toggle icons cost width in the same row, so they are trimmed from 6px of side padding to 4px. "My Boards" had moved to the middle of the second header bar, and that was mine: the phone rule that makes the All Boards page a flex column was written for a bare `.wrapper`, and header.jade puts `wrapper` on #header-main-bar on every page that is NOT a board. So the header bar became a flex column too, and the bar's own `align-items: center` then centred its items across it. Scoped to `#content .wrapper`: the page wrapper is inside #content, the header bar is not. (The `height: 100vh` that rule replaced was landing on the bar as well.) tests/narrowWindowLayout.test.cjs pins the avatar's placement and fails on a bare `.wrapper` rule in the phone block; tests/boardListScrollChain.test.cjs follows the scoped selector. Thanks to xet7 ! |
||
|
|
5741ec7c20 |
The board bar reads left to right, and the header says which mode you are in.
Four things from the same two screenshots, all on a phone and all the same in mobile mode and desktop mode, because every rule here is chosen by WIDTH. The board's buttons started on a row of their own under the title. Every group is one flex item - deliberately, so a long title pushes them all down together - but that also means they move as one block even when there is room beside a short title for several of them. On a phone the groups are `display: contents` now, so each button is a flex item of the bar itself: they start immediately to the right of the title and wrap only when the row runs out. The sidebar hamburger sat on a row below the buttons, with the empty band that goes with it. It was already meant to be pinned to the top right corner - by two rules scoped to `body.board-view`. Nothing in this app ever sets that class: it is written in 67 CSS rules and added by no code, so those rules have never applied, in either mode. The width-based copy asks `:has(.board-header-sidebar- toggle)` instead - is the hamburger there - which is the thing the rule actually cares about. (The other 65 dead `body.board-view` selectors are left alone: they are a separate question, and turning that class on would flip every `body:not(.board-view)` rule in the header at the same time.) The mobile/desktop toggle did not say which mode was on. The two icons differed only by colour - #000 for the active one, #666 for the other - which at 14px on a phone is no difference at all. The current mode is now a filled chip in the active theme's accent with a white glyph, and the other side is faded to 0.35. The avatar sat higher than the bell beside it, and its initials sat low in the circle. The first is a 4-6px BOTTOM margin from the mobile blocks, which in a centred row lifts an item by half of it; the bell and the avatar have no block margin now. The second is the initials SVG: `y="11"` of a 15-unit viewBox is 73% down, and font-size 16 in that box is taller than the box - it is `y="50%"`, `dominant-baseline="central"` and font-size 10 now, for the user, organization and team avatars alike. tests/narrowWindowLayout.test.cjs pins all four, including that these rules do not hang off body.board-view. Thanks to xet7 ! |
||
|
|
0af0912a6e |
All Boards on a phone: the board list scrolls to its last board.
Reported against 10.10, again against 10.37, and again against 10.38 after two
fixes that made the numbers more accurate instead of removing them. An inner
scroller only works when every ancestor between it and the viewport has a
DEFINITE height, and on a phone this chain was built out of viewport arithmetic:
.wrapper height: 100dvh - but it lives INSIDE #content,
which already begins below the
two header bars, so its bottom
sat about two bars BELOW the
screen, and it is overflow:hidden
.boards-layout (no height) - so the `height: 100%` under it
resolved to auto
.board-list height: calc(100dvh - 120px) - a guess at everything above it.
On a phone that is ~226px: two
header bars plus a search header
that wraps to two rows. The list
box therefore reached ~100px
below the screen: it scrolled
internally, but its last rows
were under the fold where no
gesture could bring them.
That is "you cannot scroll the board list", and no amount of dvh could fix it:
both the wrapper and the list were measuring the wrong thing.
There is no viewport arithmetic below `body` now. The page is 100dvh (with the
vh fallback), and from there it is a flex chain: the wrapper takes what #content
has left, the layout takes what the wrapper has left, the board column is a flex
column whose header keeps its own height, and the list takes the rest with
`min-height: 0` so it may be shorter than its content - which is what makes it
scroll. It ends exactly where the screen does, whatever the bars above it are.
The left menu is bounded the same way, and `.mobile-view` no longer carries its
own copy of the magic number, so both modes scroll by the same mechanism.
tests/boardListScrollChain.test.cjs checks every step of the chain and fails if
"viewport minus a guess" comes back; tests/mobileViewportHeight.test.cjs, which
pinned the previous attempt, now asserts the opposite for those three containers
and keeps the page-level dvh rule.
NOT verified here: there is no phone in this environment and Playwright's fixed
viewport has no browser toolbar, so this is reasoned from the source. What IS
verified is that the chain now has a definite height at every step, which the
previous two attempts did not.
Thanks to mimZD and xet7 !
Fixes #6488,
|
||
|
|
f6c83495bc |
The bell and the avatar sit the same way in both modes.
They were placed by whatever margin happened to win: one auto margin on the zoom pill pushed the pill, the bell and the avatar to the end of the row as a packed group, so the bell sat against the pill with all the empty space beyond it, and the avatar's distance from the edge was whatever was left over - different in mobile mode and in desktop mode on the same phone. Below 800px - a width, so both modes get it - the free space is shared around the bell instead: an auto margin on EACH side of it puts it midway between the zoom pill and the avatar, and the avatar keeps a fixed 12px gap to the right edge rather than being flung against it. Exactly one auto margin belongs to the bell pair; the user bar's is cleared, since two would split the row and separate them again. Both `.iphone-device` variants are named in the selector list. That fallback sets these margins with `!important` and two classes more than a bare id selector, so without naming them the placement would apply everywhere EXCEPT the phone this was reported from. The cascade was resolved property by property, shorthand `margin` included, rather than assumed. tests/narrowWindowLayout.test.cjs pins the two auto margins, the single fixed gap, and that the iphone-device variants are named. Thanks to xet7 ! |
||
|
|
202add9da4 |
All Boards on a phone: one drag-handle size, and a workspace name you can read.
Two things differed between mobile mode and desktop mode on the same phone. The board tile's drag handle was a 26px circle in mobile mode and a 40px one in desktop mode - two rules for the same handle, `.board-list.mobile-view .board-handle` and the `.board-list .board-handle` inside the phone media query. On a ~97px tile the big one covered a good part of the tile it was meant to sit on. Both are the smaller one now, which is still well over the ~24px a finger needs; the ≤360px block said 40px too, and says 26px now. A workspace had no readable name in EITHER mode. The row packs a drag handle, a folder icon, the name, a menu button and a count chip, and the rule for the phone said the name "must give way to the fixed items around it". It gave way completely: those items at their desktop paddings come to ~130px, the menu column on a 375px phone is ~145px, and the name was laid out in the 15px left over. The fixed items are trimmed to what they need on a phone - about 90px together - and the name is given a floor of 3.5em it may not shrink below, so there is always a name to read, with an ellipsis when it is long. It stays clipped to its own box, so it cannot spill over the menu button, which was a separate bug and is pinned by its own assertion. tests/allBoardsPhoneRow.test.cjs reads the sizes out of the cascade rather than trusting the comments: every phone handle rule is 26px, the name has an em floor and an ellipsis, each fixed item is trimmed, and the clip is still there. Thanks to xet7 ! |
||
|
|
eb56ea5895 |
A narrow WINDOW gets the narrow-window layout, not only mobile mode.
The phone/desktop toggle writes an explicit choice and Utils.isMiniScreen() returns it as-is, so a phone whose user picked DESKTOP mode is not a mini screen and its body carries no `.mobile-mode`. Every fix written for one of those two did nothing there - while the viewport was still 375px wide. Three of them showed up in the same set of screenshots. "Create board" opened 160px from the left with its right half off the screen, so its Create button could not be reached. The geometry laid the popup out as a floating box of min(380px, 55vw) anchored to the button, while popup.css - which has given every popup the full width and its own 48px header below 800px for years - then made it 375px wide. The two disagreed, and the inline `left` from the geometry stayed. Now the geometry returns the top-left corner for any viewport that narrow, and the CSS pins the sheet with `position: fixed` and `inset-inline-start: 0` (with `!important`, because left/top are inline styles), so neither can drift from the other. The board bar's hamburger was pushed onto a third row of its own, with the empty space that goes with it: it comes after the buttons in the flex order, and a flex line breaks in order. The three mobile-mode rules that take it out of the flow and pin it to the corner - and reserve its width as end padding - are now also written by width. The quick-access bar was still wider than the screen, so the avatar was cut off at the right edge. The drag-handle toggle's arrows and its check/ban were breaking onto two lines, which reads as two buttons; they are one line now. The mode toggle gave up 21px of padding on each side of its two icons, and the logo 20px of its cap - about 60px of a 375px bar, which is what the avatar needed. The logo cap names the `.iphone-device` variant explicitly, since that one sets 84px with one class more and would otherwise win. tests/narrowWindowLayout.test.cjs replays the sheet decision at 375/800/801px and pins each of the three rules; the popupOffset suite gains the narrow-window case beside its mini-screen one. Thanks to xet7 ! |
||
|
|
08f4c80c73 |
The zoom number is inside its white pill again, and big enough to read.
Two things had gone wrong with the zoom control on a phone, both visible in the same screenshot: the white rounded pill was empty, and "100" sat to the right of it in tiny type, half under the notification bell. The pill was allowed to shrink below its own contents (`flex: 0 1 auto` + `min-width: 0`, from the change that made the bar fit the screen). A flex item that shrinks past its content does not clip it - the background box ends where the width says, and the text carries on outside it. So the white area and the number it belongs to were laid out at two different widths. The pill is sized by what is in it now, and what is in it is made small instead: a compact "100%" and a 46px input for when it is clicked to be edited. The tiny type was `font-size: 0.7em` on a bar whose own text is 12px - about 8px, the smallest text on the page, and set with `!important` on selectors specific enough to beat anything written later. That declaration is now a plain 14px, the size of the rest of the bar, which is also why the pill stays narrow: at 14px "100%" needs about 40px. The base rule also caps the pill at `max-height: 24px`, shorter than 14px text with padding, which pushed the number against the top edge; the mobile rules lift that cap and centre it. Every one of these declarations is `!important` because the "Make zoom controls larger" block at this very width sets 21px paddings and margins that way - the cascade was checked selector by selector, not assumed. tests/mobileAllBoardsFit.test.cjs pins it: the pill and the number never shrink below their contents, the cap is lifted, no zoom rule sizes the text as a fraction of an already small bar, and the number is at least 12px. Thanks to xet7 ! |
||
|
|
dea262ef6c |
All Boards on a phone: fit the screen, and give the board titles their width.
Two things from the same screenshot.
The board titles were laid out TWO CHARACTERS per line - "Da" / "ta". The drag
handle is one absolutely-positioned ~26px circle, but the space for it was
reserved three times on the way down: 32px on the `li`, 30px on the tile and
50px on `.details`. On a ~97px phone tile that is more than the whole tile, so
the title was laid out in what was left, about 27px. It is reserved once now,
on the tile, and not at all when the handle is not rendered - with drag handles
off there is nothing there to reserve for, which is the state the screenshot was
taken in. The `.mobile-view` tiles already had this fix; the plain ones, which
is what a phone gets when the list is not in mini-screen mode, did not.
The page could also be dragged sideways: the avatar sat past the right edge and
the board list moved with the page when you did. On a small screen the
quick-access bar is `flex-wrap: nowrap` with `overflow: visible` - deliberately,
so an item that does not fit spills rather than disappears - and every item
declares `flex-shrink: 0 !important`. Nothing could give way, so the row was
wider than the screen, and a visible overflow is scrollable overflow. The widest
item by far was the zoom pill: an 80px fixed input plus padding took ~113px of a
375px bar, more than the home icon, the mode toggle and the bell together. "100"
fits in about half of that, and the pill may now shrink; the bell and the avatar
never shrink, being what the user came for. `html { overflow-x: hidden }` on a
small screen is the guarantee that a future item, a long translation or a custom
logo cannot bring the sideways scroll back.
tests/mobileAllBoardsFit.test.cjs pins both: the handle width is reserved once
and dropped entirely when there is no handle, and the bar's widest item can give
way while the page cannot scroll sideways.
Thanks to xet7 !
|
||
|
|
9f82877492 |
Admin Panel: /information and /translation showed the page you came from.
Playwright caught this on all three browsers: "Version page shows Reactivity
mode" got All Boards instead. Both old URLs are panes of Admin Panel / Settings
now, and both redirected with FlowRouter.go('setting') called from INSIDE
triggersEnter. A trigger runs while its own route is still entering, and a go()
from there is swallowed - the action() renders nothing, so whatever page the
browser was already showing simply stayed. A bookmark to either URL landed
nowhere.
A trigger redirects with the `redirect` it is HANDED, which is the form the
redirections table at the bottom of config/router.js has always used.
Each URL now also asks for the pane it used to be a page of - Version for
/information, Translation for /translation - so the bookmark lands where it
pointed rather than on the default pane. The request is consumed once, so a
later visit to /setting opens on the default, and it marks the open pane as
decided so the site-admin autorun does not undo it a moment later.
tests/adminOldUrlRedirect.test.cjs pins the redirect form (and that no
FlowRouter.go() creeps back in), the pane each URL asks for, and that the
ReactiveVars it sets are created before it runs.
Thanks to xet7 !
|
||
|
|
89920762ac |
All Boards on a phone: size the scrollers by the viewport that is actually there.
The reporter says the board list still cannot be scrolled on a phone at v10.37, after the layout fix. There is a reason that fix cannot have covered it, and it is not visible in the Playwright run: a fixed test viewport has no browser toolbar. The page sizes its scroll containers as `100vh` minus a bit - the wrapper, the left menu, the board list, and the mobile body and content area. On a phone `100vh` is deliberately the LARGEST the viewport can be: the height with the browser's toolbars hidden. With the toolbar showing, every one of those boxes reaches under it - and the wrapper is `overflow: hidden`, so what is underneath cannot be scrolled to at all. The bottom of the board list is simply unreachable, which looks exactly like "the list does not scroll". Each of those rules now states the `vh` value first, as the fallback, and the same value in `dvh` - the viewport as it is at that moment - immediately after. A browser that understands `dvh` gets the real height; one that does not behaves exactly as before. The two scrollers also declare `overscroll-behavior: contain` and `touch-action: pan-y`, so a vertical swipe is given to them rather than to the page behind or to another gesture. NOT verified here: there is no phone in this environment, and no browser toolbar in Playwright, so this is reasoned from the source and from how the mobile viewport units are defined. What IS verified is that nothing else in the page's touch handling blocks the scroll: with drag handles on - which a touch screen turns on - a board drag may only begin on the handle, the tile itself stays free, and the touch drag-and-drop bridge honours that cancellation. tests/mobileViewportHeight.test.cjs pins all of it, including that the `vh` fallback is declared before the `dvh` value. Thanks to mimZD and xet7 ! Fixes #6488, |
||
|
|
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, |
||
|
|
b3ea034e10 |
Admin Panel / Settings opened on Visibility instead of Version.
Caught by the newest Playwright run: the Version page test failed in all three browsers, and the page it got was Visibility. The multitenancy work decided the opening pane at onCreated: const siteAdmin = tenantAdmin.isSiteAdmin(ReactiveCache.getCurrentUser()); this.versionSetting = new ReactiveVar(siteAdmin); At onCreated the user document has often not arrived yet, so getCurrentUser() is null, "is this the site admin?" is false for EVERYONE for that moment, and the page opened on the pane meant for an Organization's own admin - for the site admin too. Admin Panel / People had the same shape and could open on the wrong pane the same way. Both open on what they always opened on again - Version and Login - and the exception for an Organization's own admin is applied in an autorun, once, when the user is actually known. Thanks to xet7 ! |
||
|
|
5a75558f80 |
Admin Panel checkboxes: undo the -9999px offset too, or only the tick shows.
The app-wide rule that hides a native checkbox hides it in THREE ways at once: display, visibility, and `inset-inline-start: -9999px`. The Admin Panel rule undid the first two, so the box was on screen - 9999px to the side. Unchecked it was simply not there; checked it appeared, because the checked state sets its own -3px offset. That is exactly what "only the checked state is visible" was, in the S3/MinIO, Azure and GCS panes and everywhere else a native checkbox is used. `inset-inline-start: auto` (and `top: auto`) undoes the third. The test now reads the hiding rule and requires the Admin Panel to undo every property it hides with, rather than a list written by hand - so a fourth way of hiding one would fail here instead of on screen. Thanks to xet7 ! |
||
|
|
8593e9411e |
Admin Panel / People / Login: the checkboxes threw instead of saving.
TypeError: can't access property "set", tpl.loading is undefined on every click in the Login pane - Forgot Password, Self-Registration, Username Change, Self delete user account, Display Authentication Method - and on the E-mail pane's Save. Blaze hands an event handler the instance of the template the handler is REGISTERED on. When those handlers moved onto Template.general and Template.email - which they had to, because Admin Panel / People renders those panes now - the state they poke, `loading`, stayed behind on Template.setting. So the first line of each handler threw, the setting was never written, and nothing on screen said so. Both templates create their own `loading` now. tests/adminTemplateState.test.cjs walks the Admin Panel components and fails when an events or helpers block reads `tpl.<name>` that its own template never created, so moving a handler without its state cannot pass again. Thanks to xet7 ! |
||
|
|
f054ad9e71 |
Admin Panel checkboxes: undo the form-field height floor.
The material declarations were right, but one thing still fought them: forms.css styles `input:not([type=file])` as a form FIELD - grey background, 6px radius, padding, bottom margin, and `min-height: 41px`. Everything else was overridden; the height floor was not, so a 13px box was drawn as a tall rectangle and the tick it turns into was stretched with it. That is why the checked state looked roughly right and the unchecked one did not, in Attachments / Limits / Avatars, in the S3/MinIO, Azure and GCS storage panes, and everywhere else a native checkbox is used. `min-height: 0` (and `min-width: 0`) undoes it - the same reset `input[type="radio"]` does a few lines below that rule in forms.css, for exactly this reason. The test now asserts every part of the form-field styling is undone, naming the 41px floor, so this cannot come back unnoticed. Thanks to xet7 ! |
||
|
|
7f01afdc20 |
Admin Panel / Attachments / Backup: pick the schedule's day from buttons.
Day of week was a text field. It only ever accepted an English day name, typed exactly right, from an admin reading a page in their own language - and nothing said so. It is seven buttons now, each labelled in the reader's language. Day of month was a number spinner: 27 clicks to reach the end of the month, and no sign that the 29th to the 31st are not offered at all - a schedule there would skip February. It is 28 buttons, one per date. What is STORED is unchanged: the English day name and the number, because that is what the cron sentence is built from (models/lib/backupPaths.js scheduleText). Only the labels are translated. The chosen one is filled with the theme colour, the way the selected left-menu entry is, and the rows wrap rather than squeeze. The choice is template state now, seeded from the saved schedule when it arrives - and not overwritten by it once the admin has picked something. Thanks to xet7 ! |
||
|
|
17f41eb15b |
Admin Panel / Attachments / Backup: the three include checkboxes are one row.
"Attachments, Avatars, Data (text)" already draw as the Admin Panel's checkbox - the plain square when off, the green tick when on, animated between, like Announcement's "Active System-Wide Announcement" - since the checkbox style was made the material one for every native checkbox in the panel. What they lacked was layout: three inline labels, so a label could wrap away from its own checkbox, and the box shifts a few pixels as it turns into the tick, which unaligned text follows. They are one flex row now, each label holding its box and its words together. Thanks to xet7 ! |
||
|
|
b7d7453f5c |
Admin Panel: every popup's Save is the same button as a pane's Save.
The Save inside the New and Edit popups for Translation, User, Organization and Team is an `input[type=submit].primary.wide` in a flex `.buttonsContainer` - and `.wide` never reached it, because the rule for it in forms.css is written as a DESCENDANT selector, `input[type="submit"] .wide`, which an input can never match. So those Saves were the right colour but a different, cramped size from the Save in a pane (People / Login, People / E-mail, Visibility). All eight popups are now listed with the panes' own Save declarations - the theme accent, the same padding, weight and states - and each Save takes its row, which is what `.wide` was for. The popups are named one by one on purpose: `.buttonsContainer` is board-sidebar and member-menu markup too, and those are not Admin Panel buttons. The test walks the Admin Panel templates and fails if a popup with a Save is not in that list, so the next popup added cannot quietly get a plain button. Thanks to xet7 ! |
||
|
|
43d30a3a41 |
Admin Panel / Settings / Visibility: Hide Logo is a checkbox too.
The last Yes/No pair in the pane. Like the four in All Boards: Hide above it, the setting is on or off, so it is one checkbox in the Admin Panel's own style - square when off, green tick when on, animated between - and the Logo section's Save writes the tick, skipping it when the checkbox is not on screen. Visibility has no radio pairs left. Thanks to xet7 ! |
||
|
|
d48a467e9b |
Admin Panel / Settings / Visibility / All Boards: Hide is four checkboxes.
Public boards, Board activities, Card counter list and Board member list were Yes/No radio pairs. Each of them is on or off, and the group's own title already says what turning one on means - "All Boards: Hide …" - so each is one checkbox now: the same checkbox as everywhere else in the Admin Panel, with the plain grey square when off, the green tick when on, and the animation between. The section's Save writes the ticks the way it read the radios, and still skips a setting whose checkbox is not on screen rather than writing it as false - the guard that keeps a hidden field from being blanked, which is what these settings' own regression test is about. Thanks to xet7 ! |
||
|
|
a315a23cb7 |
Admin Panel checkboxes: the unchecked square and the animation, not just the tick.
The first attempt drew the checkmark with a pseudo-element over the box. That got the checked state right and lost the other two thirds of the checkbox: the plain grey square when unchecked, and the 0.2s morph between them that Announcement's "Active System-Wide Announcement" checkbox has. The rules are now `.materialCheckBox` and `.materialCheckBox.is-checked` applied to the input itself - the same square, the same morph into the same green tick, the same transition - with `appearance: none` as the only addition, to take the browser's own rendering out of it. A native Admin Panel checkbox and a WeKan one are now the same checkbox in every state. The test compares them declaration by declaration against forms.css, so a change to the material checkbox that is not carried over here fails rather than quietly leaving the two different again. Thanks to xet7 ! |
||
|
|
83ddeee57d |
Admin Panel: the edit popups' Save is the same button as a pane's Save.
A pane's Save is a `button.primary`, which forms.css themes. The Save inside the Admin Panel edit popups (Edit User, Edit Organization, Edit Team) is an `input[type=submit].primary.wide` in a flex row - and `.wide` never reached it, because the rule for it in forms.css is written as a DESCENDANT selector, `input[type="submit"] .wide`, which an input can never match. So the popups' Save was the same colour but a different, cramped size. Both are listed with the same declarations now - the theme accent, the same padding, weight and states - so they cannot drift apart again, and the popups' Save takes its row, which is what `.wide` was for. Also: a checkbox written as `label > input + text` (Attachments / Limits / Avatars, and the Backup checkboxes) gets the gap between box and words that the .materialCheckBox markup gets from its own layout. Thanks to xet7 ! |
||
|
|
362b14c3d9 |
Admin Panel: one checkbox look, and Allow Email Change becomes a checkbox.
WeKan hides the native checkbox app-wide and draws its own square with a green tick - `.materialCheckBox`, which is what Admin Panel / Settings / Announcement shows for "Active System-Wide Announcement". But several Admin Panel panes use a real <input type="checkbox">: the storage Read toggles, the Organizations and Teams feature columns, the Backup checkboxes, the Problems summary. Those were either invisible, because nothing re-enabled them, or re-enabled pane by pane and then drawn by the BROWSER - on Ubuntu a big orange box that ignored the chosen theme entirely (orange under clearblue), at a different size in every pane. The Admin Panel now styles them itself: `appearance: none` takes the browser's rendering out of it, and the tick is drawn the same way .materialCheckBox draws it - two borders of a rotated box, in the same green - so a native checkbox and a WeKan one are the same checkbox to look at. Grey icons, disabled and keyboard focus are handled with it, and the panes no longer each re-enable and re-size their own. Admin Panel / People / E-mail / Allow Email Change is one such checkbox now instead of a Yes/No radio pair: the setting is on or off. Save below writes it as it wrote the radios, and only when the checkbox is on screen. Thanks to xet7 ! |
||
|
|
d726759060 |
Admin Panel: the selected left-menu row is painted like the second header bar.
It used to be filled with `--theme-accent`, one flat colour. That is close for most themes and wrong for clearblue, whose bar is a colour SLIDE - a gradient no single accent value can express. Every theme's own `#header` rule in boardColors.css now names the selected row as well, so the two are painted by exactly the same declaration, theme by theme: a flat colour stays flat, a gradient stays a gradient, and adding a theme cannot make them drift apart. The `--theme-accent` rule stays as the answer for an instance with no theme at all. tests/themeAccents.test.cjs asserts every allowed theme paints the row, and that the selector is only ever added to a rule that also paints the header - never to a copy of the colour. Thanks to xet7 ! |
||
|
|
19a5ea0b71 |
Theme: every named theme publishes its accent, so the whole UI follows it.
Choosing a named theme recoloured the header - which has a `.board-color-<name>#header` rule of its own - and left everything that reads the `--theme-accent` CSS variable on the stock blue: the Admin Panel's selected left-menu row, its pane buttons, every Save button, the table-page controls and the popup header. That variable was only ever set when a user picked a CUSTOM colour for a flat/clear theme. models/lib/themeAccents.js now maps every allowed theme to the colour that theme paints its header with, and globalThemeColor.js publishes it as --theme-accent whichever theme is in force: the user's own override, the board's colour, or the site theme. A custom colour still wins over it, and the has-custom-theme-* classes stay tied to a custom colour - they exist to override a named theme's own header rule, which a named theme must not do to itself. tests/themeAccents.test.cjs parses boardColors.css and fails if the map and the stylesheet ever disagree, so a theme cannot be added in CSS alone and quietly fall back to blue. The Admin Panel edit popups (Edit User, Edit Organization, Edit Team) also got their layout fixed: they are centred on the window rather than positioned from the table row that opened them - which pushed their right-hand side, and the Save button, off the screen - and their fields lay out in as many columns as the window has room for, so a long form no longer has to be scrolled to reach Save. No popup can be wider than the window any more. And two smaller things in the Admin Panel: the Wait Spinner setting shows a live preview of the spinner beside its dropdown, which wraps below the dropdown when there is not enough room; and the Translation table's New column moved to the left, where every other Admin Panel table page has it. Thanks to xet7 ! |
||
|
|
eebb0a7d8c |
Site theme: the top bars must take it too.
Admin Panel / Settings / Visibility / Change color set the site theme and the buttons picked it up - but both top bars stayed on the default colour, while a user's own override still coloured them. The reason: #header, #header-quick-access and .board-wrapper each spelled the order of themes out in the template - the user's own override, else the board's colour - so nothing there read the site theme (docs/Design/Page/Theme.md, layer 2) at all. Only the <body> autorun knew about it, which is why the buttons changed and the chrome did not. One Blaze helper, themeColorClass, now answers for all three, in the one order: the user's own override, then the board's own colour on a board page, then the site theme. The templates read that single answer instead of re-deriving part of the order, so the layers cannot drift apart again. tests/globalThemeColor.test.cjs asserts both halves: that the three places use the helper, and that the helper keeps the order. Thanks to xet7 ! |
||
|
|
f15d0c0cba |
Multitenancy: the three tenant modules must be ES modules.
Every app file is an ES module in Meteor, so `module.exports = {…}` in one of
them throws the moment the CLIENT bundle loads it:
Uncaught Error: ES Modules may not assign module.exports or exports.*,
Use ESM export syntax, instead: ./models/lib/tenantAdmin.js
and because it throws, every module after it in the client graph never runs -
models/users.js imports tenantAdmin, so the whole client went down with it.
models/lib/tenants.js, tenantAdmin.js and tenantBackup.js now export with ESM
syntax, and every importer uses import instead of require(). The .cjs unit tests
load them with a dynamic import(), the way tests/cardUrl.test.cjs already loads
its module.
tests/tenantWiring.test.cjs guards both halves, so the same crash cannot come
back quietly.
Thanks to xet7 !
|
||
|
|
36b899b9d6 |
Multitenancy: one WeKan server for many domains, with Organizations as tenants.
Implements option D of docs/Design/Multitenancy/Multitenancy.md, which that document now describes as shipped. An Organization may claim hostnames (Admin Panel / People / Organizations -> Edit), carry its own branding - product name, logos, help link, legal notice and theme colour - and have its own Organization admins, appointed from the row's "..." menu. The request's host picks the Organization; its branding replaces the instance branding for that request, and the client bundle that host serves points its DDP connection back at that host instead of at the one ROOT_URL. An Organization admin administers their own Organization and nothing else: its people, its Organizations row, its theme colour and its backups. They can never grant the site-wide Admin flag, never manage a site admin, and never see another Organization's people or archives. Per-tenant backup and restore is one new control in Admin Panel / Attachments / Backup - Scope. An Organization's archive holds its boards and everything on them plus the attachments those boards use, and no accounts, no instance settings and no org/team documents, because those are shared. A restore may only write to boards that Organization owns: the board ids are the intersection of what the archive claims with what the Organization really owns, every document is checked against that, and "replace all" replaces that Organization's documents rather than everyone's. Admin Panel / Settings / Visibility gains a Change color section above Logo: the site theme, rendered by the SAME shared picker as Board Settings and Member Settings - one template for all three, the way one shared table page serves every table. Its design is the new docs/Design/Page/Theme.md. The order of themes is WeKan's default theme, then the site theme (an Organization's own value on its own hosts), then a user's own override; a board's own colour still owns the board page. All of it is OFF unless the server is started with MULTITENANCY=true (plus MULTITENANCY_TRUST_PROXY_HOST=true when a trusted proxy sets X-Forwarded-Host), so an instance that has never heard of tenants answers exactly as before. One WeKan server per customer remains the supported topology for customers who must not share a process, and the design says plainly what this does NOT isolate. The decisions are three pure modules - models/lib/tenants.js, tenantAdmin.js and tenantBackup.js - so the same rules run on the client, on the server and in the tests. Four new suites pin the separation rather than the plumbing: forged Host headers, cross-tenant queries, privilege escalation and cross-tenant restores. Thanks to xet7 ! |
||
|
|
eba25459a3 |
Comment out Admin Panel / Attachments / Sandstorm.
The pane only had content inside a Sandstorm grain: the one-time MongoDB 3 -> FerretDB migration status and a button that DELETED the raw MongoDB 3 database files to reclaim grain disk. Compacting the MongoDB database frees that space as well, so deleting raw database files is not something WeKan needs to offer. The left-menu entry, the pane template, the helpers, the template state and the click handler are commented out rather than deleted, so nothing of it runs and the grain migration report can be brought back if it is ever wanted. The server methods it called are left in place. Everything else keeps working: the storages and their statistics, moving attachments between storages, the MongoDB <-> FerretDB database migration, and Backup. The grain's own migration, which runs in sandstorm-src/start.js before the app boots, is unchanged. Thanks to xet7 ! |
||
|
|
f0ea1601b3 |
Admin Panel: the board-member restriction moves to Organizations and Teams, as two.
"Add board members only from the same Organization or Team" was one checkbox in the
Login pane - which is where neither of the two things it restricts lives. It is two
checkboxes now, each in the pane it is about:
Admin Panel / People / Organizations [_] Add board members only from the same
Organization
Admin Panel / People / Teams [_] Add board members only from the same Team
A candidate may be added to a board when they share at least one ENABLED kind with
whoever adds them: an Organization when the first is on, a Team when the second is.
With both on that is "an Organization OR a Team" - exactly the rule the single
setting had - so an install that has the old field and neither new one is migrated
to both on first start, and nobody's restriction changes by upgrading. Ticking only
one is the new, narrower choice that was not expressible before.
models/settings.js boardMembersFromSameOrgOnly, boardMembersFromSameTeamOnly
server/models/settings.js the startup migration from the old single field
server/lib/orgTeamRestriction.js
boardMemberRestriction(setting) reads the pair - and
still reads the old field, so an install behaves the
same before the migration runs; canAddUserToBoard()
takes a flag per kind (the old restrictEnabled still
means both)
models/users.js sharesOrgWith / sharesTeamWith, and
sharesRestrictedOrgOrTeamWith(user, restriction)
Enforced in the same three places as before - inviteUserToBoard, the user-search
typeahead that must not offer what the server would reject, and the imported-user
reconciliation - so the two settings cannot drift apart from what the UI says.
Thanks to xet7 !
|
||
|
|
40c1c1e717 |
Admin Panel / People / Login: one "Login: Allow" group of checkboxes.
The pane mixed two opposite ways of saying the same kind of thing: "Disable Forgot Password" and "Disable Self-Registration" as checkboxes where TICKED meant off, and "Allow Username Change" / "Allow users to self delete their account" / "Display Authentication Method" as Yes/No radios. Half the rows meant the opposite of the other half, and the word Allow or Disable was repeated on every one of them. One group title says it once - "Login: Allow" - and every row under it is a checkbox that is ticked when the thing is allowed: Disable Forgot Password -> [_] Forgot password Disable Self-Registration -> [_] Self-Registration Allow Username Change (Yes/No) -> [_] Username Change Allow users to self delete their account (Y/N) -> [_] Self delete user account Display Authentication Method (Yes/No) -> [X] Display Authentication Method `disableForgotPassword` and `disableRegistration` are stored as "disable" flags, so their checkbox asks `unless`: only the DISPLAY is inverted, the stored fields and their handlers are untouched. The three former radios write on click like the checkboxes they now are - a checkbox that has to be confirmed by a Save button further down the pane is a checkbox you think you have already set - so the Save at the bottom keeps only what is still a field: the default authentication method and the OIDC button text. Translations: `forgot-password` already existed and is already translated everywhere, so the row reuses it and `disable-forgot-password` is gone; `disable-self-registration` becomes `self-registration`, whose name no longer contradicts what the row means; `display-authentication-method` is reused as it is. The two account settings keep their keys - `accounts-allowUserNameChange` and `accounts-allowUserDelete` still describe the setting exactly - and only lose the "Allow" their group title now carries, so every language keeps its translation until Transifex offers the shortened source. One bug fixed on the way: a dead `js-toggle-display-authentication-method` handler that only toggled a CSS class sat LATER in the same event map than the real one. A duplicate key in an object literal silently overrides the earlier one, so it would have swallowed every click on the new checkbox. Thanks to xet7 ! |
||
|
|
f15b37e4e0 |
Admin Panel / People / E-mail: the Save saves, and the domain field says what it does.
Two settings, neither of which was ever written:
* "Email domain name" (mailDomainName). The Save handler starts with
checkField('#mail-server-host'), and the SMTP block is commented out of this
pane's markup - checkField THROWS on an input that is not there, and the throw
was caught and swallowed, so the handler returned before its Settings.update.
Pressing Save did nothing at all.
* "Allow Email Change" (accounts-allowEmailChange). The radios rendered the
stored value and NO handler anywhere in the app wrote them back.
The Save button moves out of the Yes/No row - where it read as part of that one
radio pair - to its own line below both settings, and writes both: the domain into
Settings, the Yes/No into AccountSettings. Every field is written only when its
input is actually rendered, which is the guard the rest of these panes use, so the
SMTP fields being commented out can no longer abort the save.
And the label is renamed with its value, because "Email domain name" said nothing
about what the field decides and read as if it limited who may sign in. It does
not: a NON-ADMIN whose address ends with this domain may send board invitations,
and only while self-registration is disabled (isNonAdminAllowedToSendMail in
server/models/settings.js). The key `can-invite-if-same-mailDomainName` becomes
`email-domain-allowed-to-invite`, "Email domain allowed to invite people, when
self-registration is disabled".
Thanks to xet7 !
|