egonSchiele / chisel

Open source writing app
https://chiseleditor.com
Other
38 stars 3 forks source link

fix: force side menus open on first load #2

Closed alexandersmanning closed 1 year ago

alexandersmanning commented 1 year ago

There is an issue with the sidebar state loading to localstorage in which you can end up with a black screen and now way out (without deleting your localstorage).

This change tries to reduce the architectural impact by just forcing menus to be open if a chapter is not selected, and not allowing them to be closed if a chapter is not selected or in the case of the chapter menu, if a book is selected.

Before broken-sidebar

After fix-sidebar-before

egonSchiele commented 1 year ago

good catch! I think we could also make the 'open side panels' chevron part of the side panels component instead of the editor component. Also just a heads up, pressing esc will toggle them open and closed.

egonSchiele commented 1 year ago

Actually, that's not true, because the keyboard shortcut is on the editor. Definitely something to work on.