openedx / frontend-app-course-authoring

The micro-frontend for course authoring in Open edX. Frontend interfaces that currently live in Studio/CMS should eventually live here.
GNU Affero General Public License v3.0
12 stars 66 forks source link

Library Home - Filter by Tags #1048

Open ChrisChV opened 1 month ago

ChrisChV commented 1 month ago

Mockups: Figma mid-fi

  1. Implement tags filter widget image
  2. Implement tags search widget. image
    • Reuse the FilterByTags code as much as possible.
    • Shows the list of taxonomies and tags in a hierarchical manner
    • The Clear filter button removes the selected tags.
    • Everything else should work like FilterByTags does:
      • Add, Remove tags.
      • Search tags
      • Apply the filters after add or remove tags
      • Maintain the order and other filters currently applied.
  3. For now, it only needs to work on the "Components" tab. But the tags filter widget should be visible on all tabs.
  4. Implement filter count image
bradenmacdonald commented 1 month ago

@ChrisChV I think this should actually be using FilterByTags, not ContentTagsDropDownSelector. Because ContentTagsDropDownSelector is not for filtering - it displays all available tags. Whereas FilterByTags is for filtering search results, and it only shows the tags that are actually used in the library. Plus it's already using the right UI.

bradenmacdonald commented 1 month ago

@ChrisChV For your other questions, it should work the same way as the course search modal that we built.

ChrisChV commented 1 month ago

@bradenmacdonald Thanks for the info!

ChrisChV commented 1 month ago

@bradenmacdonald Could you add this to the milestone?

bradenmacdonald commented 1 month ago

TBA When apply the filter. It must maintain the https://github.com/openedx/frontend-app-course-authoring/issues/1038 and https://github.com/openedx/frontend-app-course-authoring/issues/1049 currently applied

This functionality is already implemented for the course search modal. You can re-use the same components, so you don't have to re-implement this.

Reuse the FilterByTags code as much as possible.

Don't re-use the code - just use FilterByTags directly :) It should already work perfectly for this use case and not need any changes.

yusuf-musleh commented 3 weeks ago

@ChrisChV @bradenmacdonald There seems to be 2 styles in the Figma for how the filters should look like:

Style 1:

Screenshot 2024-06-26 at 10 43 19 PM

Style 2:

Screenshot 2024-06-26 at 10 43 38 PM

They are next to each other in Figma, however I'm not sure which one is the final one we are going with?

ChrisChV commented 3 weeks ago

@yusuf-musleh This is the Hifi Header

bradenmacdonald commented 3 weeks ago

@yusuf-musleh @ChrisChV The filter components already exist - just re-use the existing ones that we have. They look more like "Style 1".

Screenshot 2024-06-26 at 6 10 48 PM

I think they don't have icons though, so adding icons would be a nice addition, but not necessary for the MVP.

yusuf-musleh commented 3 weeks ago

@bradenmacdonald @ChrisChV Got it, thanks for the clarification.

Yes we're using the existing components, i've added the icons as well, in this PR.