Step 14 - comments
1 min czytania
Add commenting using the comments subcollection from prompt 02.
- One collection, two views: comments without elementId form the board-wide discussion; comments with elementId form a pinned thread on that element.
- Comments side panel: board thread by default; selecting "comment" on an element (context bar action) switches the panel to that element's thread, with a back link to the board thread.
- Draw a small comment badge with a count on every element that has a thread (canvas-drawn, from a commentCounts computed map). Clicking the badge opens that thread.
- Unread indicator on the panel toggle: compare the latest comment createdAt against a locally stored commentsReadAt per board.
- Permissions per the rules: authors edit (mark editedAt) and delete their own; org members may delete any comment (moderation). Guests can comment.
- Author name + color chip on each comment; relative timestamps.
Acceptance: two windows hold a conversation on the board thread and on an element thread; badges update live; moderation delete works for a member but not for another guest.
Dyskusja
Komentarze: 0Brak komentarzy. Rozpocznij dyskusję.