vscode-kanban icon indicating copy to clipboard operation
vscode-kanban copied to clipboard

Make file format more VCS and merge friendly

Open pmiossec opened this issue 7 years ago • 2 comments
trafficstars

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:

  • if you want to add reorder of tasks in the columns
  • if you want to keep a task once "done" and "cleared" (without deleting all its content). Now all the card data are deleted :( That could be a setting if we want to delete the card data or just remove the id from the "done" array.

PS: thanks for this good extension!

pmiossec avatar Oct 09 '18 11:10 pmiossec

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

laurNtiu avatar Apr 18 '19 10:04 laurNtiu

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 ;)

pmiossec avatar Dec 01 '20 11:12 pmiossec