Skip to content

✨ Move UI Workspace configuration from project .codeedit/selection.json to UserDefaults/AppStorage #513

@austincondiff

Description

@austincondiff

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...

07-macOS-code-edit-split-editor-layout-config

Describe alternatives you've considered

n/a

Additional context

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRIORITYThis issue has priority over other issues.blockingenhancementNew feature or request

    Type

    No type

    Projects

    Status

    🏁 Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions