Skip to content

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

Closed

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

Activity

  1. self-assigned this
    on Apr 20, 2022
  2. lukepistrol commented on Apr 20, 2022

    @lukepistrol
    Member

    I'll do that in the next few days!

  3. austincondiff commented on Apr 20, 2022

    @austincondiff
    CollaboratorAuthor

    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?

  4. austincondiff commented on Apr 22, 2022

    @austincondiff
    CollaboratorAuthor

    @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?

  5. added a commit that references this issue on Jun 9, 2022
  6. austincondiff commented on Jun 10, 2022

    @austincondiff
    CollaboratorAuthor

    @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)?

  7. lukepistrol commented on Jun 10, 2022

    @lukepistrol
    Member

    @austincondiff nope not yet. Just everything that was implemented prior. Just moved from the .json file to UserDefaults

  8. austincondiff commented on Jul 30, 2022

    @austincondiff
    CollaboratorAuthor

    @lukepistrol What is required for this to be closed?

  9. removed their assignment
    on Jul 30, 2022
  10. moved this from 🆕 New to 📋 Todo in CodeEdit Projecton Feb 15, 2023
  11. austincondiff commented on Apr 19, 2025

    @austincondiff
    CollaboratorAuthor

    Closing. I believe at this point what needed to be done was done and the rest may be irrelevant.

  12. moved this from 📋 Todo to 🏁 Complete in CodeEdit Projecton Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions