Skip to content

[Tagging] Refined Tag Drawer #190

Description

@bradenmacdonald

"As a course author, I want to easily add tags to content in my course"

Design: See the various "Refined Tag Drawer" flows in "Content Tagging MVP"

Depends on #187 and #188 .

Acceptance Criteria

  1. Use the new tag widget from #187
  2. Use the new "add tags" widget from #188 (should already be in place)
  3. The drawer now has a read-only and edit view.
  4. A footer with actions has been added to the drawer. In read-only mode it displays "Close" and "Edit Tags". In edit mode, it displays "Cancel" and "Save"
  5. When the user selects the "edit tags" button, the drawer enters "edit mode":
    a. X's appear next to deletable tags
    Screenshot 2024-01-25 at 2 05 34 PM
    b. Any collapsed taxonomies expand
    c. "Add a tag" fields (#188) appear at the bottom of the sections for each taxonomy
    d. Buttons in the footer change to "cancel" and "save"
  6. There is no "x" in the top right of the drawer
  7. "Manage tags" has been moved down
  8. Taxonomies with tags added to them are open by default, and ordered according to the number of tags they contain
  9. Taxonomies with no tags are listed alphabetically below the taxonomies with tags
  10. Styling of headings has changed
  11. Dropdown arrows moved to the left of taxonomy name (Note: this may change, for consistency with [Tagging] New Tag Sidebar Widget - Unit Page (in MFE) #187).
  12. Styling has changed for the count of tags per taxonomy
  13. The tag count shows as "0" for taxonomies without tags, and is greyed out.
  14. Changes are not saved immediately when users Add/Delete tags - they are kept in the local state of the tag drawer during edit mode and only saved when the user clicks save.
  15. When the user clicks Save:
    a. Any newly added/deleted tags are persisted. (Use React Query - this should also instantly update any tagging widgets on the Outline/Unit pages)
    b. The drawer changes to Read-Only mode but stays open.
    c. A toast appears in the bottom left of the page saying "N tags added", "N tags removed", or "X tags added, Y tags removed". We can skip the UNDO feature shown in Figma for now (will come post-MVP)
  16. If the user clicks on the grey area outside of the tagging drawer AND there are unsaved changes (at least one added/removed tag):
    a. The drawer does not close
    b. The footer of the drawer animates to draw the user's attention to the actions (see Figma). Perhaps like Blink 2 at this link
  17. Make sure the drawer scrolls (see note below)

Developer Notes

  1. This is a big task! Consider splitting it up into 2-3 smaller PRs if at all possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions