Commit Graph
15 Commits
Author SHA1 Message Date
Lauri Ojansivu 3e5bc58105 Card Settings: a checkbox per section, always every field, only in Board Settings.
Card Settings is now only Board Settings / Card. The opened card has no
Card Settings button any more: it simply shows every field its board
shows on cards, empty or not.

- On this card, Show empty and Show empty fields are removed, with the
  hamburgers' Select all / Select none rows, their handlers, helpers,
  board methods (setCardFieldAlwaysShown, setShowEmptyCardFields), CSS
  and the three translation keys. The card no longer reads its own
  shownFields / hiddenFields, nor the board's cardFieldsAlwaysShown /
  showEmptyCardFields; the schema keeps them so old documents validate.
- Every section has a checkbox before its title: whether the whole
  section is shown on the chosen side, whatever its rows are ticked.
  Stored per side in cardSettingsHiddenOnCard / cardSettingsHiddenOnMinicard
  (setCardSettingsSectionShown, board admins). The opened card's view
  of the board and a new minicard view read false for every row of a
  hidden section, Scrum fields included; Card Settings itself reads the
  raw board, so the rows keep their ticks.
- A section with one row on the chosen side is one line: one checkbox,
  the name, one hamburger.
- A hamburger is drawn only when it holds something.
- Custom Fields: its items are the board's custom fields, in their sort
  order, reordered by drag and drop within the section, with a + under
  them that creates one. Show on Minicard sets a field's showOnCard,
  Show on Card its alwaysOnCard; its hamburger edits the field. The
  section's checkbox is the board's Custom Fields flag of that side.
- Card actions (Filter: Subtasks, Edit voting, Card kind, ...) live in
  the card's own section hamburgers; Card Settings keeps only board
  actions.

Docs: docs/Features/Cards/Card-Settings.md replaces
Card-Settings-On-Card.md; Card-Fields.md and Board Settings / Card.md
rewritten. New tests cardSettingsSectionShown and
cardSettingsCustomFields; the guards of the removed behaviour say why
they changed; card-add-fields.e2e.js covers section hiding per side, an
empty card showing every field, empty hamburgers, the one-row line, the
Custom Fields items and +, and that the opened card has no Card
Settings.

Thanks to xet7 !
2026-10-28 22:43:29 +02:00
Lauri Ojansivu c4f528159b Opened card: cover on by default, a new drawing is the cover, one line under + Add, no empty Similar cards or Custom Fields; the + Add popup moves, maximizes and fits its menu and labels.
- The cover image on the opened card is on by default. The schema default
  is true, and the once-ever upgrade step cover-on-card-on turns it on for
  the boards created while it was opt-in; a board turned off later stays
  off, also on an install that had no board yet.
- A new drawing becomes the card's cover; saving an edit leaves the cover.
- One separator line under "+ Add": the Sort group's gate read the board
  itself, not the card's view, and drew its rule over fields the card does
  not show.
- Similar cards: asked when the card opens, and the section is there only
  when there are some, with how many.
- Custom Fields: only on a card that has a custom field value or ticked
  Custom Fields in "+ Add" - which is now how a card with none gets the
  section and its menu.
- The "+ Add" popup moves by its title bar (and by the drag handle, shown
  only while drag handles are on, for every movable popup), has maximize /
  minimize beside its close button, is wide enough for the pane's labels
  and high enough for every menu entry, and a pane opened shows its ticks
  without animating them - only the clicked one animates.

Thanks to xet7 !
2026-10-25 15:11:03 +02:00
Lauri Ojansivu b4bcded492 A checked checkbox is a check mark in right-to-left languages too, not "<".
The tick is a box rotated 40 degrees, drawn by its bottom and side borders,
and the side was border-inline-end. A right-to-left page puts that on the
left, so the rotated corner opened the other way and every checked checkbox
showed "<" - the Admin Panel's bounced-email table in Persian, in the issue.
A check mark is not mirrored in a right-to-left language, so all 25 rules
that draw one - the shared materialCheckBox, checklists, subtasks, the
sidebar, the Admin Panel and every board theme's colour - use border-right
and border-left now. Where the box sits stays logical.

tests/rtlCheckMark.test.cjs fails if any checked state anywhere in client/
draws its tick with a logical border. tests/playwright/specs/rtl-check-mark.e2e.js
compares the computed borders in ltr and rtl. customFieldsSectionMenu's guard
now expects border-right, and its comment says why.

Thanks to mimZD and xet7 !

Fixes #6786.
2026-10-19 17:37:53 +03:00
Lauri Ojansivu 76dcb6575a Add an "Admin only" flag on custom field definitions (#3141).
A custom field marked Admin only has its value hidden from - and cannot be
set by - a non board-admin board member: not on the card detail view, not on
the minicard, not in the card's "assign a custom field" popup list, and not
through the setCardCustomFieldCheckbox/setCardCustomFieldCurrency Meteor
methods or a direct client write of customFields.<index>.value. The toggle
itself, in the custom-field definition editor, is only rendered for and only
writable by a board admin (CustomFields.allow's update/insert rules now check
board.hasAdmin() specifically for the adminOnly field, on top of the existing
write-access check every other field edit already requires).

models/lib/customFieldsWD.js gets a small pure filterAdminOnlyDefinitions()
helper so the gate has one tested choke point: models/cards.js's
customFieldsWD() - shared by both the card-detail and minicard templates -
filters admin-only definitions out before matching them to a value, and
client/components/cards/cardCustomFields.js reuses the same helper for the
popup's field list.

Thanks to CarloRampini and xet7 !

Closes #3141,
2026-09-10 20:34:30 +03:00
Lauri Ojansivu 250adfe9ac Edit Custom Fields popup: no rule above Add when there are no fields yet.
The hr between the field list and "Add custom field" was unconditional,
so with no custom field on the board yet it drew a rule with nothing
above it to separate. It is now conditional on board.customFields.length.
2026-09-09 11:59:15 +03:00
Lauri Ojansivu 828fc2d718 Revert Legacy HTML4 browser interface and parity changes
Remove the progressive HTML4/Legacy Omi middleware, cookieless sessions, page controllers, assets, parity refactors, design documents and associated tests. Restore the standard Meteor interface and operations from before the HTML4 work began.

Preserve intervening translations, backup screenshots, session upgrades, cryptographic test identifiers, local image storage, document previews and lazy browser loading. Extract the GIF utilities still required by image features into imageGif.

Validate the Node suites and add standard-interface and GIF regressions. Two existing failures remain in docsLinksResolve and ruleDetailsLocalization; browser regressions are registered but require a running server.

Thanks to xet7 !
2026-09-07 17:03:59 +03:00
Lauri Ojansivu e7dd62f21d Add accessible HTML4 card custom fields 2026-09-07 00:33:04 +03:00
Lauri Ojansivu 491781c449 Restore the complete WeKan Node test suite.
Backfill the new default-on opened-card custom-fields setting for existing boards. Keep regression guards aligned with the intended visibility, date controls, resizable card width, supplied initials and board publication layout, and exclude downloaded Go toolchains from the FerretDB source scan.\n\nThanks to xet7 !
2026-08-19 00:10:46 +03:00
Lauri Ojansivu 692207bf5e Improve accessibility and tab order across WeKan.
Thanks to xet7 !
2026-08-18 22:30:13 +03:00
Lauri Ojansivu a7879012c9 Fix custom-field interactions and deleted-field exports.
Thanks to Heart1010 and xet7 !

Fixes #6611.
2026-08-18 18:10:47 +03:00
Lauri Ojansivu 5723b56927 Use the shared checkbox in the custom-field picker.
Replace the Font Awesome checkbox imitation with the materialCheckBox markup used by Admin Panel, Settings, and Announcement, including its shared animation and checked-state styling.\n\nThanks to xet7 !
2026-08-17 02:21:32 +03:00
Lauri Ojansivu 0201c1fb89 Custom Fields form: the checkboxes are the animated one, beside their labels.
The markup was already the Admin Panel / Announcement checkbox - `a.flex >
.materialCheckBox + span`, a grey square that morphs into a green tick over
0.2s. What it lacked is where it is drawn.

The Custom Fields create and edit form is a POP-OVER, and a pop-over renders in
the global popup container, not inside `.sidebar`. So these rows never got the
`align-items: center` that #6465 added for exactly this - `.flex` on its own is
only `display: flex`, with no alignment and no gap, so the box sits on one line
and its label on another. The morph was there the whole time; it played on a box
that was not next to the words it belongs to, which beside the announcement's
neat row is what "not the animated one" looks like.

The rows are aligned now, and both halves of the box are spelled out for this
popup: the 13px square with its 0.2s transition, and the green tick it becomes.
The checked half already existed for the board Card Settings and Subtask
Settings popups, which are pop-overs for the same reason; the create/edit form
is added to that list, and the unchecked half is written out beside it - without
it the transition would run between a box some other rule happened to size and
the tick, which is the animation looking wrong rather than missing.

tests/customFieldsSectionMenu.test.cjs pins that the form's six checkboxes are
`.materialCheckBox` and not a native one the browser would draw, that both popup
names carry the alignment and both box states, and that the transition is there
- it is the transition that makes it animate rather than jump.

Thanks to xet7 !
2026-08-15 11:23:21 +03:00
Lauri Ojansivu 67b91c8504 Custom Fields popup: a new field appears, and the pencil is beside the name.
Two reports against the popup the Custom Fields heading opens.

A new field made from it never appeared. "Add custom field" sits OUTSIDE the list
of fields, so its data context is the popup's own - which is the CARD - and the
shared create/edit form decided insert-vs-update on whether its context had an
`_id`. A card has one, so creating a field from a card ran the UPDATE branch
against a custom field whose id was a card's: no such document, nothing written,
nothing said. From the board sidebar the same form works, because there the
context has no `_id`, which is why this only ever happened from a card.

Both halves are fixed. The popup hands the create form an empty context, since a
new field is made from nothing. And the form no longer trusts a bare `_id`: it
asks whether that id NAMES a custom field, so a context arriving from anywhere
cannot make it update one that is not there.

The pencil was on a line of its own under the field's name. Every other pop-over
list has one anchor per row, so `li` is a block and the anchor fills it - and two
anchors in a block stack. This list has two by design, the name with its checkbox
and the pencil that edits the field, so the ROW is the flex container and the
name takes the space the pencil does not. Scoped to this popup, so no other list
moves.

tests/customFieldsSectionMenu.test.cjs gains both: that the create form is handed
an empty context and decides by looking the id up, and that a row is a checkbox,
a name and a pencil on one line.

Thanks to xet7 !
2026-08-15 06:24:06 +03:00
Lauri Ojansivu aba09a0879 Custom Fields: the section is there for every card, so the only way in always is.
Playwright failed "custom fields panel opens from card details" in all three
browsers, and it was the app, not the guard. Everything about custom fields
moved to the hamburger at the end of the card's own Custom Fields heading - the
picker of which fields are on this card, a pencil each, and "Add custom field" -
and the card menu's entry, the Board Settings row and the wrapper popup went
with it. But the heading was drawn only `if customFieldsWD`, the card's own
custom-field VALUES.

So the one way in existed only once you were already through it. A card with no
custom field had no heading and therefore no hamburger; a board that had never
used them had no way anywhere, since the sidebar view that still holds the
create/edit forms is opened by nothing. The chicken-and-egg was invisible on any
board that already had a field, which is every board a developer tests on, and
was caught by a seeded board that had none.

The heading is now drawn for every card its reader may write to - `canModifyCard`,
the same condition the rest of the editable card uses. The FIELDS below still
come from `customFieldsWD`, so a card with none shows an empty section rather
than a phantom row per board definition, and a reader who may not write sees no
heading at all.

`a.js-custom-fields` went too. The move took away its label text and left the
tag: an empty anchor that rendered nothing, could not be clicked, and had two
`'click .js-custom-fields'` handlers still bound to it in cardDetails.js. All
three are gone, and `CardPage.openCustomFields` clicks the hamburger that is the
real entry point.

tests/customFieldsSectionMenu.test.cjs gains the two that would have caught
this: the heading is gated on who may write rather than on what the card already
has, and no empty anchor or orphaned handler is left behind. Its five existing
assertions - including that the three old places stay gone - still pass.

Thanks to xet7 !
2026-08-15 05:23:35 +03:00
Lauri Ojansivu e612fdfee9 Custom fields: everything about them on the section that shows them.
They were spread over three places. Board Settings had the board's list of
fields behind a right-sidebar view; the card menu had an entry for that list and
another for the picker of which fields are on this card; and the picker had a
cog that jumped back to the sidebar, closing the menu and the card pane on the
way.

One place now: the hamburger at the end of the card's own Custom Fields
heading. It opens every field the board has, ticked when it is on this card,
with a pencil each and, under a rule, "Add custom field". Edit and Add open in
the same pop-over on top of that list, so the back arrow returns to it and the
card stays open behind, and they are the board's own forms rather than second
copies of them.

Gone with it: the card menu's Custom Fields entry, the Board Settings row, the
wrapper popup that nothing opened any more, and the styles that existed only to
make a sidebar list look right inside a pop-over. The sidebar view template
stays where it is, with a note that nothing opens it.

tests/customFieldsSectionMenu.test.cjs pins the popup's three parts, that the
forms are the shared ones, and that none of the three old places came back.

Thanks to xet7 !
2026-08-14 08:20:30 +03:00