✨ Move UI Workspace configuration from project `.codeedit/selection.json` to UserDefaults/AppStorage
Is your feature request related to a problem? Please describe.
We need to not clutter user project directories, so we need to move UI preferences to UserDefaults/AppStorage.
Describe the solution you'd like
We would store an object like this to allow for split layouts in Navigators, Inspectors, and Editors with tab order in each.
Note: Navigator and Inspector tab order will sync between open workspaces, while open editors and editor layout is workspace specific.
{
"workspace-ui": {
"navigator": {
"panels": [
{
"size": 0.5,
"items": ["project", "find", "source-control"]
},
{
"size": 0.5,
"items": ["packages", "symbols"]
}
]
},
"inspector": {
"panels": [
{
"size": 1,
"items": ["file", "source-control", "quick-help"]
}
]
},
"workspaces": [
{
"paths": ["~/repos/todo-list-app/"],
"layout": {
"direction": "horizontal",
"groups": [
{
"size": 0.5,
"editors": [
"~/repos/todo-list-app/package.json",
"~/repos/todo-list-app/src/index.js",
"~/repos/todo-list-app/src/components/App.jsx",
]
},
{
"size": 0.5,
"layout": {
"direction": "vertical",
"groups": [
{
"size": 0.65,
"editors": [
"~/repos/todo-list-app/src/components/Checkbox.jsx",
"~/repos/todo-list-app/src/components/Input.jsx",
]
},
{
"size": 0.35,
"editors": [
"~/repos/todo-list-app/src/init.js"
]
}
]
}
}
]
}
}
]
}
}
This layout would produce a layout that looks something like this...
Describe alternatives you've considered
n/a
Additional context
n/a
I'll do that in the next few days!
Now that I think of it, because a workspace can have multiple projects directories, we might alphabetize the project paths and create a hash from that concatenated string to use as the project id. Thoughts?
@lukepistrol Currently there is no ability to split panes, so for now just add a groups with a single object in the array with a size of 1. Does that make sense?
@Debdut @lukepistrol, can we close this issue now that #656 was closed? Was everything implemented that was specified in the issue description (not the UI issues - #338, #479)?
@austincondiff nope not yet. Just everything that was implemented prior. Just moved from the .json file to UserDefaults
@lukepistrol What is required for this to be closed?