Skip to content

fix(cards): wrap "Show all properties" properties under the dates - #2634

Open
martin-forge wants to merge 4 commits into
callumalpass:mainfrom
martin-forge:martin-forge/show-all-properties-wrap
Open

martin-forge wants to merge 4 commits into
callumalpass:mainfrom
martin-forge:martin-forge/show-all-properties-wrap

Conversation

@martin-forge

@martin-forge martin-forge commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

With Show all properties on task cards on (the default since 5.0.1), properties that don't fit beside a card's dates stay on that line and shrink, wrapping a word or a letter at a time, 4px apart instead of 12px. This affects two-line Task List rows, Kanban and Agenda cards, the card at the top of a task note and, on phones, task links in notes when Show all properties on inline task cards is on.

Before and after: two Task List rows at 280px

Cause: the setting's rule from #2586 ties on specificity with the later two-line card rule (flex-wrap: nowrap, 4px gap), and the properties keep flex: 1 1 0.

Fix (styles/task-card-bem.css):

  • Add .task-card--metadata-wrap to the setting's rule so it outranks the two-line rule.
  • Give the wrapped properties flex-basis: auto, so they move under the dates when they don't fit beside them on one line.

Trade-off: a long property that wrapped onto two lines beside the dates now takes its own line, so some cards get taller (82px → 101px at 320px). Cards with the setting off, and one-line rows from 640px, are unchanged.

Testing: a new case in e2e/issues/issue-2583-show-all-card-properties.spec.ts fails on main and passes here. Lint, typecheck and lint:css:dist pass.

With "Show all properties on task cards" on, a card's properties never took
a line of their own. The setting's metadata rule has the same specificity as
the later two-line card rule (.task-card:not(.task-card--layout-inline)
.task-card__metadata), which sets flex-wrap: nowrap and a 4px gap, so the
setting's wrap and 12px gap did not apply. The properties group also kept
flex: 1 1 0; with a zero basis it always fitted beside the dates and shrank
until a long value such as a project wrapped a word or a letter per line.

Add the card's task-card--metadata-wrap modifier to the setting's rule so it
outranks the two-line rule, and give the wrapped properties an auto flex
basis so they move under the dates when they do not fit beside them. The
one-line Task List layout from 640px keeps its own, more specific rules, and
desktop task links in notes already had an auto basis.
…-properties-wrap

# Conflicts:
#	docs/releases/unreleased.md
…-properties-wrap

# Conflicts:
#	docs/releases/unreleased.md
…-properties-wrap

# Conflicts:
#	docs/releases/unreleased.md

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant