CodeEdit
CodeEdit copied to clipboard
Save UI state per Workspace
Description
Save UI state per Workspace.
- [x] sidebar width
- [x] which files are open
- [x] which editor tab is active
- [x] order of editor tabs
- [ ] the navigator sidebar, inspector sidebar, or debugger drawer
- [x] opened/closed state
- [ ] active tab,
- [ ] tab order in each
- [ ] editor layout (when we build split editor layout in - does not need to be done now consequently)
Related Issue
- #917
Checklist
- [x] I read and understood the contributing guide as well as the code of conduct
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] I documented my code
- [x] Review requested
Screenshots
Looks good to me so far
Ready for review. Will create a new PR for remaining items after this one is merged.
My only concern is what happens when the user decides to delete CodeEdit, do these states stay on the machine? Or is UserDefault a thing that is encapsulated in the app itself?
I think it stays back and doesn't get deleted. We need to let macOS cleaner apps also to make money /jk
On a serious note, apps usually don't delete the state and just pickup where they left off in-case user reinstalls the app. Since uninstalling is to move the app to Trash, I am not sure if we have control over it.
Yeah, I think @Code-DJ is right. I think this is intentional and by design. If the user wants to get rid of these settings that consume an insignificant amount of space on their disk, they can either do so manually by deleting our folder in Application Support or they can use on of many apps to clean out this kind of data. Unlike Windows, it will not slow down your machine or degrade your experience in any way by that data being there.
Fix failed tests
Rebased the fork which resolved the build issue. A couple of variable definitions were missing from the file in my fork. Verified that it builds correctly.