From 4775c6b3c3b28e8bbdb7c31bf56ec4ef134e5d67 Mon Sep 17 00:00:00 2001 From: Vivek Ganesan Date: Wed, 15 Jan 2025 17:03:59 +0530 Subject: [PATCH] simplified card tracking --- 100.md | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/100.md b/100.md index 2f3bdf87..96365136 100644 --- a/100.md +++ b/100.md @@ -30,11 +30,10 @@ Kanban boards are a popular project management tool that enables visual organiza ["description","Board Description"], //can contain markdown too ["alt","A board to track my work"], //Human-readable plaintext summary to be shown in non-supporting clients - as per NIP-31 - // List of all columns in the board below in format ["col","col-id","name","order",<>] - // If the last element in the 'col' tag is not defined, it is assumed that column will display those cards (see event below) whose 's' tags EXACTLY the column name + // List of all columns in the board below in format ["col","col-id","name","order"] ["col", "col1-id", "To Do", "0"], ["col", "col2-id", "In Progress", "1"], - ["col", "col3-id", "Done", "2","Done, Completed, Finished"], + ["col", "col3-id", "Done", "2"], // Clients may designate a 'maintainers' list who can add/edit cards in this board [ "p", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2" ], @@ -72,10 +71,9 @@ Editing the board event is possible only by the creator of the board. [ "p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"], [ "p", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c"], - // The list of boards this card will be a part of. - // However, the card will be displayed on a board only when this event's pubkey matches an entry in the board's maintainers list - ["a", "30301::", ""], - ["a", "30301::", ""], + // The board this card will be a part of. + ["a", "30301::", ""], + ], // other fields... } @@ -94,13 +92,28 @@ In case one wants to just track another nostr event (like a tracker card, withou "created_at": 34324234234, // "kind": 30302, "tags": [ - ["d", ""], + ["d", ""], ["k", "1"], //this one tracks a text note - ["e", "", ""] // as per NIP-10 + ["e", "", ""] // as per NIP-10 // other fields as per card event above... ], } ``` +In case of tracking a replaceable event, one can use `a` tag instead of the `e` tag above. + +In case of tracking another Kanban card (30302) event, one cannot use 'a' tag as that is already used for board association. Hence, we use tags similar to git issues (NIP-34) +```javascript +{ + "created_at": 34324234234, // + "kind": 30302, + "tags": [ + ["d", ""], + ["k", "30302"], //this one tracks a text note + ["refs/board", "30301::"], // very much like git issues + ["refs/card", "" + ], +} +``` The clients MAY display this tracker card like they display the tracked event, or using the 'alt' tag of the original event if not supported. @@ -112,7 +125,7 @@ In case of tracked card, its status is deemed to be the `s` tag value of the eve This allows the automatic movement of a card (like a Git issue) across different columns as the card's status changes in the source system, without any manual updates in the board. -If the tracked event does not have an `s` tag, then tracker card event's `s` tag is the status of the card. +If the tracked event does not have an `s` tag, then tracker card event's `s` tag is shown as the status of the card. ### Event Kinds @@ -128,7 +141,7 @@ If the tracked event does not have an `s` tag, then tracker card event's `s` tag #### Card Events (kind: 30302) - `d`: Unique identifier for the card - `title`: Card title -- `a`: At least one. This points to the board that this card belongs to +- `a`: This points to the board that this card belongs to ### Access Control @@ -178,6 +191,6 @@ To maintain a consistent board state: // Subscribe to the cards of a board { "kinds": [30302], -"#a": ["30301::",...] +"#a": ["30301::"] } ```