Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tagging/filtering #8

Open
auggie-lahey opened this issue Jan 15, 2025 · 11 comments
Open

tagging/filtering #8

auggie-lahey opened this issue Jan 15, 2025 · 11 comments

Comments

@auggie-lahey
Copy link

as a user, i want to tag a card so i can filter based on tags
eg tag backend work and filter by backend

@sai-tanush
Copy link
Contributor

@auggie-lahey can user create tags, or is user only allowed to select a tag/tags(from available tags) for his card. If user can only select pre-available tags, is he allowed to select multiple tags on the same card or only one tag is allowed?

@auggie-lahey
Copy link
Author

only owner should be able to create new tags
owner and maintainer should be able to add tags to cards
any number of tags can be assigned to each card

@vivganes
Copy link
Owner

Thanks for the explanation @auggie-lahey !

@sai-tanush - This is more of a feature request than a bug, actually. Here are some more tips that can help in understanding the ask.

  1. In nostr, any event can have tags by adding a t tag like ['t','something'] to the event's JSON (See more explanation here]

Let's say there is a card event with the following json,

{
    "created_at": 34324234234, //<Unix timestamp in seconds>
    "kind": 30302,
    "tags": [
        ["d", "<card-d-identifier>"], //unique id for the card
        ["title", "Card Title"],
        ["description","Card Description"], //can contain markdown too
        ["alt","A card representing a task"], //Human-readable plaintext summary to be shown in non-supporting clients - as per NIP-31
        ["s", "To do"], //status of the card
        ["rank","10"], // order of the card in the column - cards may be displayed in the ascending order of rank by default

        // card url attachments with 'u' tags similar to NIP-98
        ["u","https://attachment1"],
        ["u","https://attachment2"],

        // add assignees using 'p' tag
        [ "p", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2"],
        [ "p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"],  
        [ "p", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c"], 

        // The board this card will be a part of. 
        ["a", "30301:<board-creator-pubkey>:<board-d-identifier>", "<optional-relay-url>"],  
       
    ],
    // other fields...
}

This feature request is to be able to add t tags to the tags property here, so that the resulting json is this:

{
    "created_at": 34324234234, //<Unix timestamp in seconds>
    "kind": 30302,
    "tags": [
        ["d", "<card-d-identifier>"],
        ["title", "Card Title"],
        ["description","Card Description"], //can contain markdown too
        ["alt","A card representing a task"], //Human-readable plaintext summary to be shown in non-supporting clients - as per NIP-31
        ["s", "To do"], //status of the card
        ["rank","10"], // order of the card in the column - cards may be displayed in the ascending order of rank by default

        // card url attachments with 'u' tags similar to NIP-98
        ["u","https://attachment1"],
        ["u","https://attachment2"],

        // add assignees using 'p' tag
        [ "p", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2"],
        [ "p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"],  
        [ "p", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c"], 

        // The board this card will be a part of. 
        ["a", "30301:<board-creator-pubkey>:<board-d-identifier>", "<optional-relay-url>"],  
        ["t","backend"],
        ["t","next-release"],       
    ],
    // other fields...
}
  1. Tag values can be free-style - any text can go into a tag value
  2. Any maintainer of the board or creator of the board can edit a card. So, the same goes here. Any maintainer of the board or the creator of the board can add tags to a card.
  3. We can render the tags as labels on the card
  4. Once we do this, we could build a filter mechanism to filter only those cards with specific tags.
  5. You can refer to the proposed NIP-100 to understand the event data structure

If you are interested in submitting a PR for this, feel free to implement any of the parts here. It is not necessary for your PR to have everything asked in this issue.

@sai-tanush
Copy link
Contributor

@vivganes @auggie-lahey thank you for taking time explaining the context

vivganes added a commit that referenced this issue Jan 20, 2025
* feat: add cardTags property to Card interface for tagging cards

* refactor: renamed the property name  of cardTags to tTags, to allign with the documentation of kanban

* chore: updated loadCardsForBoards, createCard, updateCard functions, Implemented tTags handling

* chore: added functionality for handling tTags in editCard section where authorized user can create, delete tags for their card

* style: sanitation style changes

* refactor: sanitation checks, removed console logs

* feat: added tTags functionality where user can see meta tags for the card(if present)

* refactor: sanitation checks in styles

* style: sanitation checks, changed color of tag label

* chore: updated loadKanbanCardToBoard function with tTags functionality

* minor visual changes

---------

Co-authored-by: vivganes <[email protected]>
@sai-tanush
Copy link
Contributor

sai-tanush commented Jan 20, 2025

@auggie-lahey can u explain a bit more about filtering based on tags, where should the filter be present, what type of filteration (search bar or pre-defined tags).

@vivganes
Copy link
Owner

Good news @auggie-lahey !

A part of your ask - Tagging is now possible - thanks to @sai-tanush

@vivganes
Copy link
Owner

@auggie-lahey can u explain a bit more about filtering based on tags, where should the filter be present, what type of filteration (search bar or pre-defined tags).

I will explain to you

@auggie-lahey
Copy link
Author

i like the filtering, but you did it for each column, it should be board wide, not just columns.

@auggie-lahey
Copy link
Author

also, jira gives the ability to filter on assignee, if you want to have feature parity

@sai-tanush
Copy link
Contributor

@vivganes isn't this issue solved, or do u need the filter feature in All boards as well

@vivganes
Copy link
Owner

No.. @sai-tanush we want the filters at the level of boards

Currently filters are at the column level.

@trycatchkamal may be implementing them. Please weigh in here @trycatchkamal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants