Commit Graph
7 Commits
Author SHA1 Message Date
Lauri Ojansivu 2bd5d1180a Card Settings: two panes, the card and the minicard follow their order, menus inline.
The opened card and the minicard now draw Card Settings' sections, in
Card Settings' order, each section's fields in the order of its rows:
- Section order is per side: cardSettingsSectionOrder for the card,
  the new minicardSettingsSectionOrder for the minicard. A board that
  stores none: the card starts with Labels, Date, Members, Card, ...
  (the card's historical order as far as the grouping allows), the
  minicard with what it drew first before.
- CARD_LAYOUT's and MINICARD_LAYOUT's reorderable sections are Card
  Settings' sections, so dragging a section or a row in Card Settings
  moves it on the card or the minicard. Stored field orders map: a
  field keeps its place relative to the others of its new section.
- On the card every section has the shared heading (its icon, title,
  caret and hamburger) - Voting and Planning Poker too, which had a
  heading of their own. The minicard stays compact: no headings.

Card Settings shows both sides at once: the minicard's pane first (on
the left), the card's second, each with a caret that folds it, each
scrolling on its own, stacked when the popup is too narrow for two.
The Show radio is gone. A splitter between the panes changes their
widths by dragging, like spreadsheet columns (clamped, kept per user
as a fraction, reset by a double-click, moved by the arrow keys). The
popup is wider again for two panes and its corner grip resizes it,
the panes following.

A hamburger's content opens under its line inside the pane, not in a
popup: the hamburger shows it is open (aria-expanded, highlighted, the
panel attached to it); its button, the panel's X or Escape closes it.
A custom field's edit form and the + create form open inline the same
way and close only their panel when saved. The popup layer added in
9c9742e09d is removed, as nothing uses it now.

Docs: Card-Settings.md, Card-Fields.md and Board Settings / Card.md.
New tests cardSectionsOnCard, minicardSections, cardSettingsSplit,
cardSettingsInlinePanels and card-settings-sections-order.e2e.js; the
guards of the old layouts and orders say why they changed.

Thanks to xet7 !
2026-10-29 02:02:54 +02:00
Lauri Ojansivu 79b4467546 Let every Board Settings / Card row be shown on the card and the minicard.
Eighteen rows of Board Settings / Card had only one column. Each now has
both. On the minicard: Location, Requested by, Assigned by, Flowtime and
Pomodoro while running, the attachment names, the text-note count, when
the card last changed, the description title, and the checklist title
and due date. On the opened card: the collapse caret's own switch, labels
above the title, labels text (with the user's own override, like the
minicard's), the card's List title, the swimlane name and the comment
count. A side that already drew something stays on; a new element is
off until chosen. The new minicard elements are last in the minicard
order by default and reorder like the rest.

The rows' switches are plain board flags handled by one generic toggle
that reads each row's declared default. The List title row is offered
only when the popup was opened for a card, since from Board Settings
there is no card for it to change.

Thanks to xet7 !
2026-10-02 16:39:28 +03:00
Lauri Ojansivu 2d80e6e4ee Reorder Board Settings / Card and Board View rows by drag and drop.
The up and down arrows of Board Settings / Card and Board Settings /
Board View are replaced by drag and drop. With drag handles on, a handle
sits where the arrows were; with them off, the row's icon and label are
what is dragged. The Up and Down arrow keys on the focused handle or
label still move a row one step, so the order stays reachable from the
keyboard.

A dropped Card row is walked to its place one step at a time through the
same moves the arrows made, so a pinned header stays first and a field
leaving its section takes the section along; head, tail and modifier rows
have no place of their own and are not draggable. A dropped Board View
order fills the slots of the shown rows, so a view the instance disabled
keeps its place. The DOM order is cancelled at the drop and the rows are
redrawn from what was stored. The new hint text is pending Transifex.

Thanks to xet7 !
2026-10-02 16:26:36 +03:00
Lauri Ojansivu 6d950b7474 Show each Scrum field as its own Board Settings / Card row.
The Scrum fields were a separate "Scrum settings" checkbox list under
each column of Board Settings / Card, and drawn as one block on the card
and the minicard. Each is now a row of both columns - "Scrum settings:
Sprint", "Scrum settings: Release" and so on - ordered with the other
rows, and drawn on the card and the minicard where the board's order puts
it; by default where the block was. The minicard gained Past sprints and
Acceptance criteria. The minicard's work item type row is the switch of
the work item type badge, which stays on unless turned off. The column
actions set the Scrum rows too, through scrum.configure so its lock,
revision and Scrum history apply.

Thanks to xet7 !
2026-10-02 16:08:20 +03:00
Lauri Ojansivu 859771a10e Card Settings: the default card and minicard field order is the order they had before fields became orderable.
The default of CARD_LAYOUT and MINICARD_LAYOUT - what a board with no
stored cardFieldOrder / minicardFieldOrder renders, and what
applyLayoutOrder() falls back to for the keys a stored order does not
name - is now pinned literally to the render order of cardDetails.jade
and minicard.jade at 59f7d61df, the commit before #4448 made fields
orderable. Reading those templates gives exactly the sequence the layout
module already holds, so no board changes shape; the module, the tests
and the docs now say where that order comes from and a new suite pins
both sequences so a reshuffle cannot pass by reshuffling the template
with it. The two fields newer than that commit stay beside their
closest older neighbour: Text notes in the card's tail, Swimlane name
last on the minicard.

Thanks to xet7 !
2026-09-11 21:53:38 +03:00
Lauri Ojansivu 15b2b6c533 Board Settings / Card: one "Card field order" heading over two lists, with arrows on every row.
Board Settings / Card was a three-column table (Show on Card, Show on
Minicard, the name) with a separate "Card field order" list of arrows at the
bottom that reordered five sections of the opened card. It is one heading,
"Card field order", over two lists now: "Show on Minicard" in the board's
minicard order and "Show on Card" in its card order, every row of either
`[checkbox] [up] [down] icon label`. The checkbox is whether that side shows
the field, the arrows move it on that side only, and the icon and name are
the field's own. The two lists are independent because the two orders are: a
field can be third on the minicard and last on the card.

models/lib/cardFieldOrder.js is the arithmetic, pure and tested without
Meteor: each surface is a fixed head, reorderable sections of fields, and a
fixed tail. A field moves within its section; at the section's edge it moves
the whole section; a section's header (Labels, Members, Sort number,
Description title) stays first. What is stored is one flat array of field
keys per surface - `cardFieldOrder`, which the first #4448 filled with five
section keys that stay valid and expand to what they rendered (Members
carried Dependencies and Sort, Custom Fields carried Vote/Poker), and the new
`minicardFieldOrder`. Two board setters normalise before storing; the update
allow rule keeps them to a board admin. The REST cardFieldOrder endpoints
still speak in section keys, eight now.

cardDetails.jade renders its eight sections in the board's order and, inside
Labels, Dates, Members, Sort and Vote/Poker, the fields in theirs;
Dependencies and Sort are their own templates. minicard.jade renders every
block under the title through the minicard order, with the dates line and
the badge strip ordering their own fields. Every gate is unchanged.

The popup's rows are a table, models/lib/cardSettingsRows.js, that the
template draws twice, so no row is written out by hand and each checkbox
reads the helper it always read. The tests that looked for a row's class in
the template look in the table now; tests/cardSettingsCoverage.test.cjs
derives each layout's default order from the templates and pins the popup's
shape; tests/cardFieldOrderLayout.test.cjs pins the arithmetic and its
negatives. No new translation keys: the heading and arrow keys already
existed in every locale.

Thanks to xet7 !
2026-09-11 21:18:35 +03:00
Lauri Ojansivu 131514d614 Let Board Settings reorder the card detail view's Description, Custom
Fields, Labels, Dates and Members sections.

The opened card always rendered its sections in one fixed order, with no
way to move Description earlier or have Custom Fields follow it. Boards
now store a cardFieldOrder array; models/lib/cardFieldOrder.js resolves it
against the historical default order, dropping unknown keys and filling in
any missing section so a stale or partial value can never hide or
duplicate a section. cardDetails.jade renders these five sections from
that resolved order instead of a hardcoded sequence, each now its own
template (cardFieldSectionLabels, ...Dates, ...Members,
...CustomFields, ...Description) included from an each loop; Dependencies
+Sort stay a fixed appendage right after Members and Vote+Poker stay one
right after Custom Fields, so a board that never touches the setting
renders exactly what it always did. Checklists, Attachments and Activity
are left out of this pass - they sit in their own flex/right-column
layout further down the template, and moving them was not needed for the
issue's ask (move Description earlier, custom fields after it) and would
add layout risk this environment cannot verify visually.

Board Settings / Card Settings gets a new "Card field order" list with
up/down buttons per row. Up/down rather than a drag library: this
codebase's existing jQuery-ui-sortable usages (list/swimlane/board
reordering) are heavier drag-and-drop over board layout, not a simple
settings list, so buttons are the simpler, safer mechanism here.

Thanks to mimZD and xet7 !

Closes #4448,
2026-09-10 19:59:53 +03:00