8000 Fix/gh 53 unable to add tags by mbsantiago · Pull Request #55 · mbsantiago/whombat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix/gh 53 unable to add tags #55

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

Merged
merged 4 commits into from
Mar 29, 2025
Merged

Conversation

mbsantiago
Copy link
Owner

This PR addresses issue #53 where adding tags from the annotation view failed under certain conditions.

Problem 1: New Tags Not Added to Project

Previously, when a user created a tag (e.g. via the tag palette or sound event tags), the tag was not automatically associated with the annotation project. As a result, it wouldn't appear in the tag search bar and couldn't be used.

Fix: Updated the logic for tag creation in the annotation view to ensure new tags are now properly added to the annotation project upon creation.

Problem 2: Existing Tags Not Registered to Project

Existing tags that weren't yet associated with the project also caused issues:

  • They wouldn't appear in the tag search bar.
  • Attempts to create them failed, since the backend rejected duplicates.

Fix: Improved the /tags/ endpoint behavior on creation so that it now either:

  • Creates a new tag, or
  • Returns an existing one and associates it with the project if not already linked.

This allows users to "create" a tag from the annotation view, even if it already exists, and ensures it becomes available within the project context.

Future Improvement:

We could improve the UX by:

  • Showing existing-but-unregistered tags in the search dropdown.
  • Automatically adding them to the project when selected.

Use api.tags.get_or_create instead of api.tags.create in the
/tags/create endpoint so that a tag is returned even if it existed
before.
Copy link
codecov bot commented Mar 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.62%. Comparing base (83dd078) to head (490c37e).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
+ Coverage   66.61%   66.62%   +0.01%     
==========================================
  Files         179      179              
  Lines        8375     8375              
==========================================
+ Hits         5579     5580       +1     
+ Misses       2796     2795       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mbsantiago mbsantiago merged commit 50c2e62 into main Mar 29, 2025
6 checks passed
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.

1 participant
0