The reporter coloured lists by stage and wanted cards to follow: "by merely
dragging cards around the colors would change". The only way was a script
that rewrote every card's colour through the API, again after every move.
A list's colour popup now has "Cards without a colour of their own use this
colour". Such cards are shown in the list's colour, and nothing is written
to them: a card dragged to another list takes that list's colour, and a
card's own colour always wins. models/lib/cardDisplayColor.js decides; the
card colour helpers use it from the list the card is shown in.
tests/cardDisplayColor.test.cjs covers the rule; the guards that pinned the
old colour code now pin it through the new helper. New text is in English,
pending Transifex.
Thanks to C0rn3j and xet7 !
Fixes#4756.
One card's color popup already had a color wheel (#5514) that stores a
'#rrggbb' hex in card.color; Multi-Selection offered only the ready-made
palette, so a lighter shade that keeps card text readable had to be set card
by card. The Multi-Selection color popup now has the same color wheel and
writes the same field through the same Card.setColor and server allow rule.
Both color popups also show the custom colors already used on the board's
cards beside the palette, so a color picked once is one click away for the
next cards. No new storage and no new interface text.
Cards the user may not edit (Utils.canModifyCard, e.g. a linked card whose
source board is comment-only for them) are skipped, and one refused card no
longer stops the rest of the selection. The Cards schema validates color with
one shared rule (isAllowedCardColor: empty, a palette name or a strict
'#rrggbb'), so crafted values such as 'red;background:url(...)', '</style>'
or 'javascript:' are refused on the server and never offered as swatches.
Thanks to xet7 !