Commit Graph
5 Commits
Author SHA1 Message Date
Lauri Ojansivu 138f727ebb Card shortcuts open only their popup.
d, Shift+M and Shift+C on a hovered or selected minicard opened the card
first, and Shift+M / Shift+C then opened the card's hamburger menu and
clicked its item: card, menu and popup for one key. Now the Due date, Move
card or Copy card popup opens by itself next to the minicard, as a click on
a minicard's date or label opens only its popup, and the card stays closed.
On an opened card Move / Copy open next to its hamburger without showing the
menu; d there still clicks the card's own Due date control.

The popup is opened directly, so client/lib/cardShortcutPopup.js applies the
conditions the controls a click would use are rendered under: the board
allows due dates and the user may modify the card (a Worker only edits an
existing date), Move card for a board admin, Copy card for a member who is
not a Worker, both only with cardMenuWrites. Without them nothing opens.
tests/cardShortcutPopup.test.cjs drives the rules and ties each one to its
template condition; the browser specs check the card stays closed and no
menu is shown, and that a non-admin and disabled shortcuts open nothing.
The help-list check matched "Move Card to Archive" too and now matches the
action text exactly.

Thanks to mimZD and xet7 !

Fixes #6924.
2026-11-16 16:46:06 +02:00
Lauri Ojansivu b1403ca7af The d shortcut opens the Due date editor of a card that is still being opened.
On a slower server a card's details render a few hundred milliseconds
after the click that opens it. `d` pressed in that moment found no Due
date control yet and did nothing - only the hovered-minicard path (#6755)
waited for it. Both paths now wait for THAT card's control, stop if
another card was opened meanwhile, click it once, and give up after 3
seconds.

The card details also closed any popup of their card when they were
destroyed (#6686), which a re-render of the card still open does too: a
popup could open and shut again at once. They close it now only when
the card is no longer the open one - closed, or another card opened.

The Playwright test emulates a 300 ms connection in Chromium, clicks
each card open and presses d at once: the editor opens and is still
open 1.5 s later, and closing the card still closes it. It fails on the
code before this change. dueDateKeyboardShortcut and
labelsPopupStaleCardContext pin both halves.

Thanks to mimZD and xet7 !

Fixes #6840,
2026-10-31 21:06:53 +02:00
Lauri Ojansivu 9a73bf9173 Describe each card date once for its card and minicard badge.
Received, Start, Due and End were each written twice in cardDate.js, once
for the opened card (card*Date) and once for the minicard (minicard*Date):
the same field, the same colouring, the same title and the same editor,
eight copies of about 40 lines. CARD_DATE_KINDS describes each date once
and both templates are built from it; only the due date counts down, as
before. cardDate.js goes from 596 to 410 lines.

The tests that matched each template's own helpers block read the
CARD_DATE_KINDS entry instead, and still fail if Received, Start or End
gains the countdown.

Thanks to xet7 !
2026-10-17 00:50:41 +03:00
Lauri Ojansivu 04a4f628e1 Turn keyboard shortcuts on for new users, and let d open a hovered card's due date.
The users schema stored profile.keyboardShortcuts: false for every new user,
while isKeyboardShortcuts() treats a missing value as on (keyboard shortcuts
are on by default). So a new account had shortcuts off until it turned them
off and on again. The schema default is now true, and a test pins every
profile boolean's schema default to the default its helper reads.

With no card opened, d on a hovered or selected minicard - the card the other
card shortcuts act on - now opens that card and its Due date editor, instead
of doing nothing until the card was opened. A card the user may not edit is
not opened, and nothing happens with shortcuts off.

Thanks to mimZD and xet7 !

Fixes #6755.
2026-10-10 15:03:31 +03:00
Lauri Ojansivu 784d529003 Add the d keyboard shortcut to open the opened card's Due date editor.
With keyboard shortcuts enabled, d (or Shift+D) clicks the due date + or
badge of the opened card, so it opens the same popup a click does and only
for a user who may edit the card. Inputs, textareas and editable fields are
left alone by the shared shortcut filter. Listed in the shortcuts help.

Thanks to mimZD and xet7 !

Fixes #6750,
2026-10-08 00:01:44 +03:00