Repository navigation
feat: #3565 move files and folders by dragging in the sidebar - #5945
Merged
Merged
Conversation
Contributor
|
Website preview ready: https://pr-5945-marktext-website.ransixi.workers.dev Built from |
7 of 10 tasks
Tkaixiang
added a commit
that referenced
this pull request
Nov 23, 2026
…te keys on build (#6120) * fix(i18n): translate strings left in English Several feature PRs added English placeholder values to most locales and they were never translated: - sideBar.move.* (13 keys, #5945): de, es, fr, ja, ko, nl, pt, ru, tr, zh-TW - multi-folder sidebar strings (12 keys, #5835): de, es, fr, ja, ko, nl, pt, ru, tr - preferences.editor.fileRepresentation.tabInputNotes (#5891): same 9 locales Also fills one-off gaps: GitHub Alerts labels in pl (desktop and Muya) and it (Muya), the Academic export theme in it, and the super/subscript extension label in es and pt. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(i18n): remove unused locale keys None of these keys is referenced anywhere in packages/desktop/src, either as a literal or through a template/prefix key: - menu.counter.document, documentSelection, charactersNoSpaces, allCharacters - sideBar.tree.noFolders, overlappingFolder - sideBar.search.searchInFolder (the UI uses searchInFolders) - preferences.theme.modeThemes - dialog.file, files, keepOpen, saveFailure - error.report, unexpectedErrorWithMessage - store.editor.anchorLinkCopied - editor.sourceCode.cursorNullComment, imageStructureDeletedComment - readingMode.skipped Co-Authored-By: Claude Opus 5.5 <[email protected]> * build(i18n): validate locale keys before minifying minify-locales now fails, before writing any .min.json, when: - a locale is missing a key from en.json or has a key en.json lacks - an en.json key is not referenced by any .ts or .vue file under packages/desktop/src The usage check is a single ripgrep pass that collects quoted dotted strings. Template literals (`menu.theme.${name}`) and concatenation prefixes ('sideBar.move.') match as patterns, so keys built from a variable still count as used. ripgrep comes from @vscode/ripgrep, resolved through packages/desktop, which already declares it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[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.
Closes #3565. Also addresses the sidebar movement requests in #1052, #3201 and #3302.
Summary
The sidebar can currently move items through Cut/Paste, but cannot move files or folders by dragging. Add single-item drag moves within one open root: drop onto another folder, a file inside that folder, or the root heading, confirm the actual disk move, and keep the moved document open at its new path.
Type of change
Test plan
pnpm run lint— no errors; existing warnings remain.pnpm run typecheckpnpm run test:unit— 1,717 tests passed, including move-watch recovery, reveal delegation, filesystem-aware case matching and consecutive symlink-workspace moves.pnpm run build:unpackMove-related old-path deletion notifications are suppressed at the file watcher before reaching either session state or the renderer, until every affected document has relocated and rebound its watcher. On failure, the main-process move scope rechecks the old watched paths and reports genuinely missing files through the existing observer and renderer deletion flow. There is no separate renderer compensation path. Unrelated paths and windows remain observable.
Notes for reviewers
This is a bounded MVP: one item, one window and one root per move. Multi-select, cross-root/window moves, drag-to-copy, custom ordering and automatic Markdown link repair are deferred. The confirmation explains the effect on relative links and image paths. Other windows must close affected documents before a move can proceed.
This PR closes #3565 with the core sidebar movement workflow. Arbitrary custom ordering remains outside this MVP and can be tracked separately. It does not change external file-move/autosave behavior discussed in #3509.
Visual evidence has been captured locally; screenshot upload is still pending. Generated evidence is not committed to the repository.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.