Skip to content

feat(activity): ✨ adding activity tags (UI, routes, persistence) #45#136

Merged
dvorka merged 2 commits into
dev/1.58.0from
feat-45/activity-tags
Jul 6, 2026
Merged

feat(activity): ✨ adding activity tags (UI, routes, persistence) #45#136
dvorka merged 2 commits into
dev/1.58.0from
feat-45/activity-tags

Conversation

@dvorka

@dvorka dvorka commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

This PR brings activity tags.

Related:

@dvorka dvorka requested a review from Copilot July 6, 2026 06:24
@dvorka dvorka self-assigned this Jul 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces activity tags across the MyTraL stack: parsing + persistence on the backend, form handling/routes, and display/filtering in the UI. It also reuses the same CSV tag parsing logic for exercise type tags to keep tag input behavior consistent.

Changes:

  • Added a shared utils.parse_tags_csv() helper and used it in activity + exercise-type tag handling.
  • Extended activity create/update + list/search routes to store, filter, and search by tags.
  • Updated templates to edit and render tags (badges) and added a tag filter on the year activity list; added tests covering parsing + persistence behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_activity_tags.py New tests for tag CSV parsing, ActivityEntity tag round-trips, and dataset persistence/search predicates.
mytral/utils.py Adds parse_tags_csv() helper for normalized tag parsing.
mytral/templates/macros/activity_list_table.html Renders activity tags as badges in the list table (and links them when year is available).
mytral/templates/activity-update.html Adds tags field to the activity update UI.
mytral/templates/activity-update-all.html Adds tags field to the bulk update UI.
mytral/templates/activity-list-year.html Adds tag filtering UI + renders tag badges in the year feed/list view.
mytral/templates/activity-get.html Renders tags on activity detail page and links to year list filtered by tag.
mytral/templates/activity-create.html Adds tags field to the activity create UI.
mytral/routes.py Populates the tags form field on edit; adds tag filter in year list and tag matching in search.
mytral/forms.py Adds tags field to activity form and persists tags via from_activity_form().
mytral/blueprints/exercise_types_crud.py Reuses utils.parse_tags_csv() for exercise type tags to avoid duplicated parsing logic.

Comment thread mytral/utils.py
Comment thread mytral/templates/macros/activity_list_table.html
Comment thread mytral/templates/activity-list-year.html
Comment thread mytral/templates/activity-get.html
@dvorka dvorka merged commit 8930f50 into dev/1.58.0 Jul 6, 2026
2 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.

2 participants