Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Fixes #10194: Fix note disappears while editing #10370

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Apr 24, 2024

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 to Folder when All Notes is open. Having notesParentType set to Folder 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:

  1. Reverts logic that sets notesParentType to Folder when opening "All Notes", and
  2. Reverts a change to the check that determines whether the all notes folder is open (see the diff for Sidebar.tsx).

While 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 to Folder 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".

@laurent22
Copy link
Owner

That's great, thanks for fixing this!

@laurent22 laurent22 merged commit 6aca77a into laurent22:dev Apr 25, 2024
10 checks passed
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.

Focus is lost and notebook disappears
2 participants