Desktop: Fixes #10194: Fix note disappears while editing #10370
Merged
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.
Summary
This pull request fixes #10194.
It also disables manually changing the order of notes in All Notes. Support for this was added in 7638bdf by setting
notesParentType
toFolder
when All Notes is open. HavingnotesParentType
set toFolder
when All Notes is a smart filter seems to have caused #10194 and the similar issues, however.A more complicated version of this pull request that keeps support of manually re-ordering notes in All Notes can be found here.
Important
This pull request does not fix the issue where notes sometimes disappear from search results (#10236).
Comparison to #10222
This pull request is #10222 with additional logic to prevent per-folder sorting from breaking in All Notes.
PR #10222 mostly reverts 7638bdf. Specifically, it:
notesParentType
toFolder
when opening "All Notes", andWhile this fixes the disappearing note issue, it seems to break the "toggle own sort order" right-click menu item in the "All Notes" folder. This is because PerFolderSortOrderService.ts previously relied on
notesParentType
being set toFolder
when determining whether per-folder sorting is enabled.Screen recordings
Checking for regressions — toggle own sort order
toggle-own-sort-order-regression-test.mp4
Attempting to reproduce the disappearing note issue with this pull request
At 1:20 in the video below, the active note disappears from the search results. As such, in at least some cases, this PR does not fix issue #10236.
note-disappears-demo.mp4
Tests
This pull request includes tests to check that PerFolderSortOrderService.ts supports enabling per-folder sorting for "All Notes".