fix #1968: prevent inline task widget collapse on mobile#1967
Open
renatomen wants to merge 1 commit into
Open
Conversation
The container context added in 26ba653 ("Improve mobile task card layout") was applied unconditionally to every .task-card. On desktop the inline widget is `display: inline`, where inline-size containment is inert, so it rendered fine. On mobile/touch the widget becomes `display: inline-flex`, which activates the containment: the card then computes its width ignoring its contents, collapsing the card and title to 0px wide. The title wraps one char per line - clipped invisible by `overflow: hidden`, while its height inflates the flex parents and the editor line, producing a large empty gap with no visible title. Scope the container to the full card layout only. The sole `@container tn-task-card` query already targets :not(--layout-inline):not(--layout-compact), so responsive behaviour is unchanged. Verified in Chromium: mobile inline widget line height 854px -> 46px, title restored to a single visible line. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Problem
Fix: #1968
On mobile, the inline TaskNotes widget (a
[[task]]link rendered in the editor) collapses: the task title is invisible and a large empty vertical gap appears between the widget and the following line. Only the status dot and ⋮ menu show.Root cause
Commit 26ba653 ("Improve mobile task card layout") added a container context to every card:
display: inline, whereinline-sizecontainment is inert → renders fine.display: inline-flex. That activates the containment: the card now computes its width while ignoring its contents, collapsing the card (and its title) to 0px wide.overflow: hiddenclips it horizontally (title invisible), while its height inflates the flex parents and the CodeMirror line → the large empty gap.Fix
Scope the container to the full card layout only. The single
@container tn-task-cardquery already targets:not(.task-card--layout-inline):not(.task-card--layout-compact), so this changes no responsive behaviour:Verification
Measured in real Chromium with the exact widget DOM + plugin CSS under
body.is-mobile:stylelint styles/task-card-bem.csspasses; existingissue-190mobile CSS test passes.