fix(desktop): put the unsaved dot back on the left of the title bar path (#5467) by Jocs · Pull Request #5468 · marktext/marktext · GitHub
Skip to content

fix(desktop): put the unsaved dot back on the left of the title bar path (#5467) - #5468

Merged
Jocs merged 2 commits into
developfrom
fix/5467-title-bar-save-dot-left
Sep 19, 2026
Merged

Jocs merged 2 commits into
developfrom
fix/5467-title-bar-save-dot-left

Conversation

@Jocs

@Jocs Jocs commented Sep 19, 2026

Copy link
Copy Markdown
Member

Fixes #5467.

What moved, and why

div.title > span carries direction: rtl so an over-long path clips from the left and leaves the filename readable (the GH#339 workaround). The save dot used to be the last child of that RTL block, and an empty atomic inline is a neutral: under an RTL base direction a trailing neutral resolves to the paragraph level, so it was laid out at the visual left of the whole line.

#5317 wrapped the breadcrumb in <bdi dir="ltr"> — the right fix for the Bidi algorithm reordering numeric path segments (~/notes/2024/09/18/report.md rendered report.md › 18 › 09 › 2024) — and carried the dot into the isolate with it. Inside an LTR isolate the dot is simply the last item in logical order, so it landed right of the filename. The margin-right → margin-left swap in that PR is the same change seen from the CSS side.

The fix

Lay the title out with flexbox: the dot becomes a flex item that precedes the breadcrumb, and the RTL clip context moves onto a dedicated .path box. #5317's isolation is untouched, and since the dot now sits outside the clip box, an over-long path can no longer swallow it — which it did before #5317.

Before / after

Measured by rendering each revision's real template + <style scoped> in Chromium:

pre-#5317 develop this PR
dot position left of path right of filename left of path
2024 › 09 › 18 › report.md order 18 09 2024 ✗ 2024 09 18 ✓ 2024 09 18 ✓
Hebrew folder order reversed ✗ in order ✓ in order ✓
long path: dot visible ✗ ✓ ✓
long path: filename visible (GH#339) ✓ ✓ ✓

Real app, unsaved document:

● Documents › notes › README.md

Tests

packages/desktop/test/e2e/issue-5467-save-dot-position.spec.ts — the layout falls out of the Unicode Bidi Algorithm and of overflow clipping, neither of which jsdom computes, so the specs drive the real app under Playwright and compare boxes:

Verified red on develop (dot at x≈834 with the first segment at x≈366) and green with the fix. titlebar-selection-word-count.spec.ts, tabs.spec.ts and launch.spec.ts (17 tests) still pass, and the no-file MarkText title stays centred.

🤖 Generated with Claude Code

Jocs and others added 2 commits September 20, 2026 07:36
…ath (#5467)

`div.title > span` carries `direction: rtl` so that an over-long path clips
from the left and leaves the filename readable (the GH#339 workaround). The
save dot used to be the last child of that RTL block, and an empty atomic
inline is a neutral: under an RTL base direction a trailing neutral resolves to
the paragraph level, which laid the dot out at the visual left of the line.

#5317 wrapped the breadcrumb in `<bdi dir="ltr">` to stop the Bidi algorithm
reordering numeric path segments, and carried the dot into the isolate with it.
Inside an LTR isolate the dot is simply the last item in logical order, so it
moved to the right of the filename — a user-visible change that was never the
point of that PR.

Lay the title out with flexbox instead: the dot becomes a flex item preceding
the breadcrumb, and the RTL clip context moves onto the `.path` box alone. The
dot is back on the left, #5317's isolation is untouched, and because the dot
now sits outside the clip box an over-long path can no longer swallow it — as
it did before #5317.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…5467)

Neither property had a guard: #5317 could move the dot without a test going
red, and the Bidi ordering it fixed was never pinned either.

Geometry is the only honest assertion here — the layout falls out of the
Unicode Bidi Algorithm and of overflow clipping, neither of which jsdom
computes — so these specs drive the real app under Playwright and compare
boxes: the dot left of the first path segment, the dot still inside the clip
box when a long path is truncated, and numeric segments in path order.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5468:

Run: https://github.com/marktext/marktext/actions/runs/35476604551

Artifact Size Link
marktext-macos-x64 297.8 MB Download
marktext-macos-arm64 287.5 MB Download
marktext-linux 638.3 MB Download
marktext-windows-x64 287.6 MB Download
marktext-windows-arm64 279.5 MB Download

@Jocs
Jocs merged commit 8ff36bc into develop Sep 19, 2026
11 checks passed
@Jocs
Jocs deleted the fix/5467-title-bar-save-dot-left branch September 19, 2026 23:57
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.

Unsaved dot moved from the left of the title bar path to the right of the filename

1 participant