CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

Save UI state per Workspace

Open Code-DJ opened this issue 2 years ago • 2 comments

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

Code-DJ avatar Jan 16 '23 16:01 Code-DJ

Looks good to me so far

matthijseikelenboom avatar Jan 16 '23 21:01 matthijseikelenboom

Ready for review. Will create a new PR for remaining items after this one is merged.

Code-DJ avatar Feb 11 '23 16:02 Code-DJ

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.

Code-DJ avatar Feb 17 '23 21:02 Code-DJ

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.

austincondiff avatar Feb 17 '23 22:02 austincondiff

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.

Code-DJ avatar Feb 20 '23 02:02 Code-DJ