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

feat: import tags to existing taxonomy #11

Conversation

rpenido
Copy link
Member

@rpenido rpenido commented Nov 21, 2023

Description

This PR adds a new menu item in the Taxonomy Card menu and the Taxonomy Details menu to allow users to import tags to existing Taxonomies by importing a CSV/JSON file. This overwrites the current tags.

import-tags

Testing instructions

  1. Have an import taxonomy template ready to be imported. You could get one from below:
  2. Go to the taxonomy list page (http://localhost:2001/taxonomies)
  3. Click on the menu from an existing taxonomy card
  4. You will be prompted to select a file to be imported.
  5. Canceling the prompt will abort the operation
  6. If the taxonomy is imported successfully, you will see an alert: Taxonomy imported successfully.
  7. Importing an invalid taxonomy file, you will see an alert: Import failed - see details in the browser console. The error info will be logged in the browser console.

Private-ref: FAL-3536

Copy link
Member

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good @rpenido , just needs linting and tests.

Could you also make sure the new "Re-import" menu item is added to the "Actions" menu on the Taxonomy Detail page too?

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (rpenido/fal-3532-import-taxonomy@5983953). Click here to learn what that means.

Additional details and impacted files
@@                         Coverage Diff                         @@
##             rpenido/fal-3532-import-taxonomy      #11   +/-   ##
===================================================================
  Coverage                                    ?   88.77%           
===================================================================
  Files                                       ?      449           
  Lines                                       ?     6924           
  Branches                                    ?     1470           
===================================================================
  Hits                                        ?     6147           
  Misses                                      ?      752           
  Partials                                    ?       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 one nit, but LGTM!

@bradenmacdonald can @rpenido merge this into openedx#675 and get both these "import tags" features reviewed by upstream at once?

  • I tested this on my devstack. There's a known issue with re-importing tags that affects the backend logic, but
  • I read through the code (on feat: import tags to existing taxonomy #11)
  • I checked for accessibility issues by using my keyboard to navigate
  • Includes documentation
  • User-facing strings are extracted for translation

src/taxonomy/import-tags/data/utils.js Outdated Show resolved Hide resolved
Co-authored-by: Jillian <[email protected]>
@bradenmacdonald
Copy link
Member

@pomegranited

@bradenmacdonald can @rpenido merge this into openedx#675 and get both these "import tags" features reviewed by upstream at once?

Yes please!

@rpenido rpenido changed the title feat: import tags to existing taxonomy [temp] feat: import tags to existing taxonomy Nov 24, 2023
@rpenido rpenido marked this pull request as ready for review November 24, 2023 19:08
@rpenido rpenido merged commit 7756c7f into rpenido/fal-3532-import-taxonomy Nov 24, 2023
5 checks passed
@rpenido rpenido deleted the rpenido/fal-3536-bare-bones-update-of-existing-taxonomy-by-upload branch November 24, 2023 19:13
@rpenido
Copy link
Member Author

rpenido commented Nov 24, 2023

Yes please!

Done! openedx#675

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

Successfully merging this pull request may close these issues.

3 participants