standardnotes / desktop

[Moved to https://github.com/standardnotes/app] A free, open-source, and end-to-end encrypted notes app. https://standardnotes.com
GNU Affero General Public License v3.0
1.4k stars 115 forks source link

Folder state is not saved. On opening Standard Notes, All folders, subfolders are expanded. #832

Closed makarandh closed 2 years ago

makarandh commented 2 years ago

Edit: Before I stated that all folders appear expanded. But actually most of them were expanded (even those that were collapsed before) but some of them were not.

--End if edit.

In the old folder extension, the folder expand/collapse state was maintained across sessions. All the folders that were collapsed in the previous session appear collapsed when you open Standard Notes again.

In the new nested tag/folder system, when you open Standard notes, all the folders are expanded even if you collapsed them before.

Repro Steps

  1. Open Standard Notes.
  2. Create multiple folders, and create multiple child folders inside those folders.
  3. Collapse some of these folders such that the children folders aren't visible.
  4. Close Standard Notes
  5. Open Standard Notes

Expected Behavior The folders that were collapsed before should remain collapsed on opening standard notes again.

Actual Behavior Many of the folders that were collapsed before appear expanded.

Environment Standard Notes 3.10.0 Debian 11 (bullseye)

moughxyz commented 2 years ago

Hmm I can't replicate this. Their state should definitely be persisted.

codeoholic commented 2 years ago

I would agree with @makarandh, I am facing the same on macOS with the v3.10.0.

makarandh commented 2 years ago

I am definitely seeing the issue consistently.

Please note: Every time I open Standard Notes it's the sames folders that remain expanded. And there are two folders that remain collapsed. It doesn't matter what state the folders are in when I close Standard Notes.

moughxyz commented 2 years ago

Hmm, maybe an error is occurring silently behind the scenes preventing the state from persisting? Can you open top-level Help > Toggle error console, open the Console tab, then perform the expand/collapse action, and see if any errors are triggered?

codeoholic commented 2 years ago

I do not see any errors and the network request is also working fine. I can see the content of the request but do not see any collapse/expand flag in the request. What param should be expected there?

These are the params in saved_items array request

auth_hash content content_type created_at created_at_timestamp deleted duplicate_of enc_item_key items_key_id updated_at updated_at_timestamp uuid

moughxyz commented 2 years ago

The contents are encrypted so you wouldn't see any collapsed/expanded metadata..

makarandh commented 2 years ago

I have an update on the issue. I have signed out and cleared cache and re-logged in and the behavior is changed but still not entirely fixed.

Now, the state is saved only at the topmost folders level. That is:

moughxyz commented 2 years ago

So weird. No one on our team can replicate this. Can you do a screen recording perhaps? May be some subtle telling hints.

makarandh commented 2 years ago

https://user-images.githubusercontent.com/38956972/154457802-7e13915e-ce9f-49a7-879b-c9a250e466cf.mp4

I have attached a screen recording.

Note this folder structure in the video:

Tech - General 
    |--- Mac
    |--- Windows
             |---CMD

In the video you can see:

  1. Root folder Tech - General is expanded at the start.

  2. I expanded, then, collapsed the child folder Windows. Its child folder CMD folder is not visible.

  3. Selected the Mac folder which is also under Tech - General.

  4. Closed Standard Notes

  5. Opened Standard Notes

  6. Entered password.

  7. As you can see the child folder Windows is expanded even though it was not before closing Standard Notes.

    Here is a new observation I made after my comment from two days ago.

  8. When I collapse the root folder Tech - General and then expand it again, this time Windows folder appear collapsed, which is the desired behavior.

  9. Not shown in the video, had I expanded Windows folder before closing Standard notes, then performed the previous step (no. 8) of collapsing and re-expanding the root folder, the Windows folder would appear expanded, which is the correct behavior.

The only time issue is happening is when Standard Notes is opened (either first time after reboot or after closing it without reboot). After that if I collapse the root folders and re-expand them, the issue goes away.

makarandh commented 2 years ago

This has been fixed in the latest update to version 3.11.0.