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

Assessment labels #1085

Merged
merged 86 commits into from
Sep 27, 2024
Merged

Assessment labels #1085

merged 86 commits into from
Sep 27, 2024

Conversation

rabstejnek
Copy link
Collaborator

@rabstejnek rabstejnek commented Aug 19, 2024

This PR adds label functionality to assessments, where labels are able to be applied to visuals, data pivots, and summary tables. These labels are visible on detail and list views, and are able to be filtered by on these list views.


A label can be created on an assessment with a name, color, description, parent, and published status.

image


Creating multiple labels can lead to a tree-like structure with the use of the parent field.

image


Validation is in place to protect the integrity of the tree when assigning a parent and also with the published status, since an unpublished label with published children would break the tree if a user is not able to view unpublished labels.

image


Labels can be applied on the detail views for visuals, data pivots, and summary tables.

image


Once applied, labels can be viewed on detail views.

image


The labels can also be viewed on the list views.

image


Objects can be filtered by label in these list views.

image


Filtering by label also includes the subtree, so since "second label" is a child of "first label", objects labeled with "second label" are included when filtering by "first label".

image


Users without sufficient permissions to view published objects will not be able to see unpublished labels assigned to objects.

image


Add a filterable label list view
image


Copy link
Owner

@shapiromatron shapiromatron left a comment

Choose a reason for hiding this comment

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

Wonderful job. I made a number of edits, mostly moving code around. I also reorganized the visual list and table list views; when a visual had a long caption which is commonly the case the one-line view didn't really work. Let me know if you're ok with the visual changes @caseyhans, then ok to merge:

  • 793bc8c updates (10 hours ago) {Andy Shapiro}
  • 3629b29 tighten up a few templates (19 hours ago) {Andy Shapiro}
  • 8b10eb7 make htmx mutation observer reusable (20 hours ago) {Andy Shapiro}
  • 6695662 lint (20 hours ago) {Andy Shapiro}
  • ef8a254 rewrite pattern for loading labels to items (20 hours ago) {Andy Shapiro}
  • 7ba4ad3 refactor label htmx urls (23 hours ago) {Andy Shapiro}
  • 42e72d5 update test and view permission (23 hours ago) {Andy Shapiro}
  • ac459e5 catch case where content object does not have get_assessment method (23 hours ago) {Andy Shapiro}
  • bc050b3 move permission check to each action (23 hours ago) {Andy Shapiro}
  • a54c1d5 only delete and create those needed (24 hours ago) {Andy Shapiro}
  • 6035394 template formatting (34 hours ago) {Andy Shapiro}
  • e5acb34 make visible for team members (34 hours ago) {Andy Shapiro}
  • e578f2d make admin read-only (34 hours ago) {Andy Shapiro}
  • a892f5a make plural (34 hours ago) {Andy Shapiro}
  • f2be5d1 simplify and standardize html views; reduce # queries (34 hours ago) {Andy Shapiro}
  • 0855c3b minor schema updates (34 hours ago) {Andy Shapiro}
  • 9e9b1ab move queryset logic to manager (2 days ago) {Andy Shapiro}

@caseyhans caseyhans merged commit 560b363 into main Sep 27, 2024
6 checks passed
@caseyhans caseyhans deleted the assessment-tags-apply branch September 27, 2024 16:33
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.

4 participants