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

Levels and categories in channel details modal #3990

Merged
merged 4 commits into from
Apr 7, 2023

Conversation

rtibbles
Copy link
Member

Summary

Description of the change(s) you made

  • Adds an aggregation helper class for label maps
  • Uses it to return categories and levels for channel details
  • Displays those channel details in the channel details modal - makes a slight deviation from the spec after consultation with @jtamiace to use chips instead of comma separation for consistency with other elements
  • Cleans up ContentLevels constants, as they were being defined twice
  • Removes unnecessary prefetch_related and select_related in node details method - seems to have no impact on performance either way

Manual verification steps performed

  1. Add levels and categories to resources and topics in a channel
  2. Verify that they appear, deduplicated in the channel details modal
  3. Note that our caching may cause stale data to the be returned to the frontend, so the cache needs to be cleared

Screenshots (if applicable)

Screenshot from 2023-03-15 10-22-25

References

Fixes #3877

Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

This looks good and manual QA checks out for both the in-Studio display and PDF download.

My only (non-blocking) question is - can you remind me, did we decide to remove the parent category for category display? i.e. "Mathematics", though it also checks the "school" checkbox in the form, actually doesn't display the chip for "school" in the form, or in the details (at either the resource or channel level)

Just want to make sure this was an intentional change -- I think it was? -- and not a side effect of refactoring somewhere along the line.

@rtibbles
Copy link
Member Author

rtibbles commented Apr 7, 2023

Yes, pretty sure it was intentional to prevent display bloat.

@rtibbles rtibbles merged commit d553bac into learningequality:unstable Apr 7, 2023
@rtibbles rtibbles deleted the levels_and_categories branch April 7, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Channel info - Missing Levels and Categories
2 participants