Repository navigation
fix(editor): keep task links on one row on tablets and in narrow desktop panes (#2696) - #2697
Open
callumalpass wants to merge 1 commit into
Open
callumalpass wants to merge 1 commit into
callumalpass wants to merge 1 commit into
Conversation
…top panes (#2696) The stacked inline-card layout (title, then a row of touch targets) was keyed on body.is-mobile, which tablets also have, and on a 480px container query on every device. Scope both to body.is-phone so tablets and narrow desktop panes keep the one-row layout, and apply the properties-under-title layout for standalone task links on every non-phone width.
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.
Fixes #2696.
Cause
The stacked layout for inline task cards (title, then a row of 40px touch targets for priority, menu and properties) is meant for phones, but two selectors turned it on elsewhere:
body.is-mobile, which Obsidian also sets on tablets. On an iPad every standalone task link used the full-width two-row phone card at any width (84–86px per line). Readable line length has no effect on this.@container (max-width: 480px)stacked layout had no device check, so a desktop pane narrower than about 550px switched to it (68–71px per line, against 28–30px in a wide pane). Readable line length only caps the width at 700px, so it never crosses that threshold.Fix
styles/task-inline-widget.css:body.is-phone.body.is-mobilesizing and visible menu rule is unchanged), but use the one-row layout.Measurements (Live Preview, default properties)
Tests
e2e/issues/issue-2696-tablet-narrow-inline-widget.spec.ts: a narrow desktop pane and tablet emulation (is-tablet). It fails on main (68px).task-list-redesign.