mkloubert / vscode-kanban

Kanban board for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-kanban
GNU Lesser General Public License v3.0
283 stars 52 forks source link

Make file format more VCS and merge friendly #23

Open pmiossec opened 6 years ago

pmiossec commented 6 years ago

The current format is this one:

{
  "done": [],
  "in-progress": [
    {
      "assignedTo": {
        "name": "XXX"
      },
      "creation_time": "2018-10-09T10:36:57.861Z",
      "id": "1",
      "references": [],
      "title": "task1"
    }
  ],
  "testing": [],
  "todo": [
    {
      "assignedTo": {
        "name": "XXX"
      },
      "creation_time": "2018-10-09T10:37:05.733Z",
      "id": "2",
      "references": [],
      "title": "task2"
    },
    {
      "assignedTo": {
        "name": "YYY"
      },
      "creation_time": "2018-10-09T10:38:20.165Z",
      "id": "3",
      "references": [],
      "title": "task3"
    }
  ]
}

I think that a different format where the arrays corresponding to the kaban columns contains only the card ids could improve a lot readability of diffs when using a VCS (like git) but most important will make the file mergeable if you use the kanban board with multiple users and that you have conflicts to solve.

The current file format is very hard to merge so this extension could nearly be used only by 1 user :(

For example if someone change a value of a card and the other just change the column of the card...

Something that look like:

{
  "todo": ["3"],
  "in-progress": ["2"],
  "testing": [],
  "done": ["1"],
  "tasks": [
    {
      "assignedTo": {
        "name": "XXX"
      },
      "creation_time": "2018-10-09T10:36:57.861Z",
      "id": "1",
      "references": [],
      "title": "task1"
    },
    {
      "assignedTo": {
        "name": "XXX"
      },
      "creation_time": "2018-10-09T10:37:05.733Z",
      "id": "2",
      "references": [],
      "title": "task2"
    },
    {
      "assignedTo": {
        "name": "XXX"
      },
      "creation_time": "2018-10-09T10:38:20.165Z",
      "id": "3",
      "references": [],
      "title": "task3"
    }
  ]
}

And that format could also help:

PS: thanks for this good extension!

laurNtiu commented 5 years ago

+1 on this, just tried to merge a reasonably simple board file; in the end I gave up, opened them side by side and just redone the changes. You might also want to consider supporting YAML as well for the back-end; in my experience it merges easier.

pmiossec commented 3 years ago

I don't know if this project ( https://github.com/automerge/automerge ) could help here. Even if the example taken is exactly what this project try to achieve ;)