fix(desktop): refine document statistics popover by Jocs · Pull Request #5819 · marktext/marktext · GitHub
Skip to content

fix(desktop): refine document statistics popover - #5819

Merged
Jocs merged 2 commits into
developfrom
fix/document-statistics-popover
Oct 21, 2026
Merged

Jocs merged 2 commits into
developfrom
fix/document-statistics-popover

Conversation

@Jocs

@Jocs Jocs commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Use the concise localized character-count label and keep the existing no-spaces count semantics.
  • Stack created/modified timestamps beneath their labels and narrow the popover while preserving localized text.
  • Remove the parenthetical read-only qualifier from every supported locale so the reading-mode label fits on one line.
  • Fix the title-bar counter's hover jitter: the global .el-button:hover rule adds a 1px border, so the transparent border was still changing the button width. The trigger now keeps a zero-width border in all interaction states.
  • Remove the opacity transition and use the existing 50% editor color to avoid text compositing changes.

Type of change

  • Bug fix (non-breaking, fixes an issue)

Test plan

  • pnpm run lint
  • pnpm run typecheck
  • pnpm -C packages/desktop exec vitest run test/unit/specs/i18n.spec.ts test/unit/specs/document-statistics.spec.ts
  • pnpm -C packages/desktop exec playwright test test/e2e/i18n-shell.spec.ts -g 'reading mode uses'
  • pnpm -C packages/desktop exec playwright test test/e2e/editor-input.spec.ts -g 'Title-bar word counter'
  • Manually tested on macOS: hover/unhover geometry remains fixed; character labels, reading-mode labels, and stacked timestamps render correctly.
  • New tests added — no dedicated test added for this UI-only adjustment; existing text and localized layout assertions were updated.

Notes for reviewers

No linked issue was provided for this UI refinement. The hover-jitter root cause is the project-wide Element Plus button hover border, not the text color or popover itself.

Jocs added 2 commits October 21, 2026 09:23
Use the concise character-count label, stack localized file timestamps beneath their labels, and narrow the popover. Keep the title-bar trigger geometry fixed across hover states by clearing the global button border.
Remove the parenthetical read-only qualifier from every supported locale so the title-bar reading-mode label does not wrap in the narrowed statistics popover.
@github-actions

Copy link
Copy Markdown
Contributor

@Jocs
Jocs merged commit e4c06b6 into develop Oct 21, 2026
13 checks passed
@Jocs
Jocs deleted the fix/document-statistics-popover branch October 21, 2026 01:43
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