Skip to content

Conversation

annavik
Copy link
Member

@annavik annavik commented May 5, 2025

Summary

In this PR we suggest UI controls for adding tags to taxa, to help us bring some order to the data. See #825 for background.

Backend needs

The current solution is using dummy data. To complete this, we need to add a new field to the database. Also we need following API actions exposed:

  • Read tags
  • Update tags
  • Filter a taxa list based on tag

Screenshots

Screenshot 2025-05-13 at 15 33 12 Screenshot 2025-05-13 at 15 33 30

Copy link

netlify bot commented May 5, 2025

Deploy Preview for antenna-ood ready!

Name Link
🔨 Latest commit 8119a5e
🔍 Latest deploy log https://app.netlify.com/sites/antenna-ood/deploys/6822ef9dfa634600088a0ea5
😎 Deploy Preview https://deploy-preview-828--antenna-ood.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 5, 2025

Deploy Preview for antenna-preview ready!

Name Link
🔨 Latest commit 7a9a8e0
🔍 Latest deploy log https://app.netlify.com/sites/antenna-preview/deploys/682349064ed62f00087f4f08
😎 Deploy Preview https://deploy-preview-828--antenna-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 75 (🔴 down 5 from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@mohamedelabbas1996 mohamedelabbas1996 linked an issue May 6, 2025 that may be closed by this pull request
@annavik annavik changed the base branch from deployments/ood.antenna.insectai.org to feat/add-taxa-tags May 13, 2025 07:07
@annavik annavik changed the title Add tag feature to taxa Add frontend support for taxa tags May 13, 2025
@annavik annavik marked this pull request as ready for review May 13, 2025 13:35
@annavik annavik merged commit 2d38f7d into feat/add-taxa-tags May 13, 2025
4 checks passed
@annavik annavik deleted the feat/taxa-tags branch May 13, 2025 13:37
mihow added a commit that referenced this pull request May 16, 2025
* feat: added support for tag creation for a given taxon

* chore: moved Tag<->Taxon many2many to the Taxon model

* feat: added the Tag admin model

* feat: added custom assign_tags action to the TaxonViewSet to assign tags for a given taxon and return the assigned tags filtered by project

* fixed formatting

* merged migrations

* feat: added tags to the Taxon admin model

* feat: added global tags

* added db migration

* feat: show global tags if there is an active project

* feat: added or based taxon filtering by tag_id

* chore: renamed TaxonTagFilterBackend

* fix: fixed filtering tags by project_id in the TaxonViewSet list

* Add frontend support for taxa tags (#828)

* feat: setup UI for taxon tags

* feat: prepare UI controls for tag filtering

* feat: hook up UI tags with backend

* fix: update filter key from tag -> tag_id

* fixed Taxon List tags column name

* feat: added tags inverse filter

* feat: return global tags with project tags

* chore: reset tag migrations, add default tags

* fix: remove invalid field in taxa list query

* chore: add type hints for reverse relationships

---------

Co-authored-by: Anna Viklund <annamariaviklund@gmail.com>
Co-authored-by: Michael Bunsen <notbot@gmail.com>
annavik added a commit that referenced this pull request Jul 4, 2025
* feat: added support for tag creation for a given taxon

* chore: moved Tag<->Taxon many2many to the Taxon model

* feat: added the Tag admin model

* feat: added custom assign_tags action to the TaxonViewSet to assign tags for a given taxon and return the assigned tags filtered by project

* fixed formatting

* merged migrations

* feat: added tags to the Taxon admin model

* feat: added global tags

* added db migration

* feat: show global tags if there is an active project

* feat: added or based taxon filtering by tag_id

* chore: renamed TaxonTagFilterBackend

* fix: fixed filtering tags by project_id in the TaxonViewSet list

* Add frontend support for taxa tags (#828)

* feat: setup UI for taxon tags

* feat: prepare UI controls for tag filtering

* feat: hook up UI tags with backend

* fix: update filter key from tag -> tag_id

* fixed Taxon List tags column name

* feat: added tags inverse filter

* feat: return global tags with project tags

* chore: reset tag migrations, add default tags

* fix: remove invalid field in taxa list query

* chore: add type hints for reverse relationships

---------

Co-authored-by: Anna Viklund <annamariaviklund@gmail.com>
Co-authored-by: Michael Bunsen <notbot@gmail.com>
mihow added a commit that referenced this pull request Aug 5, 2025
* Add support for Taxa Tags (#830)

* feat: added support for tag creation for a given taxon

* chore: moved Tag<->Taxon many2many to the Taxon model

* feat: added the Tag admin model

* feat: added custom assign_tags action to the TaxonViewSet to assign tags for a given taxon and return the assigned tags filtered by project

* fixed formatting

* merged migrations

* feat: added tags to the Taxon admin model

* feat: added global tags

* added db migration

* feat: show global tags if there is an active project

* feat: added or based taxon filtering by tag_id

* chore: renamed TaxonTagFilterBackend

* fix: fixed filtering tags by project_id in the TaxonViewSet list

* Add frontend support for taxa tags (#828)

* feat: setup UI for taxon tags

* feat: prepare UI controls for tag filtering

* feat: hook up UI tags with backend

* fix: update filter key from tag -> tag_id

* fixed Taxon List tags column name

* feat: added tags inverse filter

* feat: return global tags with project tags

* chore: reset tag migrations, add default tags

* fix: remove invalid field in taxa list query

* chore: add type hints for reverse relationships

---------

Co-authored-by: Anna Viklund <annamariaviklund@gmail.com>
Co-authored-by: Michael Bunsen <notbot@gmail.com>

* chore: remove unused import

* fix: pass project ID when assigning tags

* chore: skip adding initial tags to the database

* fix: update migration deps

* fix: revert caption update to fix build

* feat: put tags feature behind feature flag

* feat: disable tag filters if no tags for project

* chore: fix migration ordering

* feat: store feature flags with project

* fix: return feature flags as a dictionary in API response

* style: simplify tags form

---------

Co-authored-by: Mohamed Elabbas <hack1996man@gmail.com>
Co-authored-by: Michael Bunsen <notbot@gmail.com>
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.

Make it possible to add tags to taxa
1 participant