Skip to content

style(sidebar): unify collapse arrows and tighten tree spacing#4265

Merged
Jocs merged 1 commit into
developfrom
style/sidebar-arrow-icons-polish
May 23, 2026
Merged

style(sidebar): unify collapse arrows and tighten tree spacing#4265
Jocs merged 1 commit into
developfrom
style/sidebar-arrow-icons-polish

Conversation

@Jocs
Copy link
Copy Markdown
Member

@Jocs Jocs commented May 23, 2026

Summary

  • Switch all collapsible sidebar panels to a consistent line-style chevron (ArrowRight from @element-plus/icons-vue) instead of the filled CaretRight triangle:
    • "Opened files" header and project-root header (tree.vue)
    • Each child folder in the tree (treeFolder.vue) — also replaces the previous icon-folder-open / icon-folder-close SVG with a single rotating arrow
    • TOC panel's <el-tree> expand icon (toc.vue via the :icon prop)
  • Tighten file-tree indentation: per-level step 20px → 6px, base offset 20px → 10px in treeFile.vue / treeFolder.vue, so deep directory trees take noticeably less horizontal space.
  • Polish search-result items (searchResultItem.vue):
    • Filename 14px → 12px, removed font-weight: 600
    • Match-count badge: smaller (10px text, 16px height), squarer (border-radius: 9px → 3px), with 0 5px horizontal padding
    • Filename row gets align-items: center so the filename and badge align on the same axis
    • Toggle arrow shrunk from 14 → 12 to match the TOC expand-icon size

searchResultItem.vue intentionally keeps its CaretRight triangle — discussed and explicitly preferred there.

Test plan

  • pnpm run typecheck — passes locally
  • Open a project with nested folders; expand/collapse a folder and the project root, and confirm the arrows rotate (right when collapsed, down when expanded) with the existing transition.
  • Open a markdown file with several headings; confirm the TOC panel uses line arrows on each expandable node.
  • Run a search across the project; confirm filename + match-count badge are vertically centered, the badge is small/squared with padding, and filename is no longer bold.
  • Compare deep-tree indentation against develop — same items should sit further left.

🤖 Generated with Claude Code

- Replace filled CaretRight triangles with line-style ArrowRight in
  tree.vue and treeFolder.vue, and use it as the el-tree expand icon
  in toc.vue, for a consistent line-arrow visual across sidebar panels.
- Reduce indent step (20→6px) and base offset (20→10px) for tree
  folder/file rows so deep directories take less horizontal space.
- Search result polish: smaller filename (12px, no bold), smaller and
  squarer match-count badge (10px text, 3px radius, 0 5px padding),
  vertically center filename with badge, and shrink the toggle arrow
  to 12px to match the TOC expand icon.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 23, 2026 02:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the sidebar UI to standardize collapsible indicators (chevrons) and reduce horizontal space usage in deep directory trees, along with small visual polish for search results and TOC expansion icons.

Changes:

  • Replace filled CaretRight triangles with ArrowRight line chevrons for tree headers, folder nodes, and TOC expand icons.
  • Tighten file/folder indentation in the project tree by reducing per-level padding.
  • Adjust search result item typography and badge sizing, and reduce toggle icon size.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/renderer/src/components/sideBar/treeFolder.vue Replaces folder open/close SVG with a rotating ArrowRight chevron and reduces indentation.
src/renderer/src/components/sideBar/treeFile.vue Reduces indentation for file items to match the tighter tree spacing.
src/renderer/src/components/sideBar/tree.vue Switches “Opened files” and project root collapse icons from CaretRight to ArrowRight.
src/renderer/src/components/sideBar/toc.vue Sets Element Plus <el-tree> expand icon to ArrowRight.
src/renderer/src/components/sideBar/searchResultItem.vue Updates icon (ArrowRight), icon size, filename styling, badge styling, and title alignment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/renderer/src/components/sideBar/searchResultItem.vue
@github-actions
Copy link
Copy Markdown

Build artifacts for PR #4265:

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

Artifact Size Link
marktext-linux 594.5 MB Download
marktext-macos-x64 534.9 MB Download
marktext-windows 272.8 MB Download
marktext-macos-arm64 534.6 MB Download

@Jocs Jocs merged commit f6da526 into develop May 23, 2026
10 checks passed
@Jocs Jocs deleted the style/sidebar-arrow-icons-polish branch May 25, 2026 03:27
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.

2 participants