Repository navigation
fix(cards): wrap "Show all properties" properties under the dates - #2634
Open
martin-forge wants to merge 4 commits into
Open
martin-forge wants to merge 4 commits into
martin-forge wants to merge 4 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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 keepflex: 1 1 0.Fix (
styles/task-card-bem.css):.task-card--metadata-wrapto the setting's rule so it outranks the two-line rule.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.tsfails onmainand passes here. Lint, typecheck andlint:css:distpass.