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

fix(redwood): show correct icons in the sidebar for units with custom XBlocks #726

Draft
wants to merge 1 commit into
base: opencraft-release/redwood.1
Choose a base branch
from

Conversation

Agrendalath
Copy link
Member

@Agrendalath Agrendalath commented Jan 6, 2025

Currently, the sidebar relies only on the XBlock's category class attribute (called type in the transformers). This behavior is inconsistent with the legacy subsection navigation, which relies on the XModuleMixin.get_icon_class method. This commit adds the icon_class to the fields collected by the transformers and uses it to determine whether the "problem" or "video" icon should be displayed for a unit in the sidebar.

Private-ref: BB-9332

@Agrendalath Agrendalath self-assigned this Jan 6, 2025
Currently, the sidebar relies only on the XBlock's `category` class attribute
(called `type` in the transformers). This behavior is inconsistent with the
legacy subsection navigation, which relies on the `XModuleMixin.get_icon_class`
method. This commit adds the `icon_class` to the fields collected by the
transformers and uses it to determine whether the "problem" or "video" icon
should be displayed for a unit in the sidebar.
@Agrendalath Agrendalath force-pushed the agrendalath/bb-9332-unit-icons-for-custom-xblocks branch from 41fe7b1 to 7f0c3db Compare January 6, 2025 23:11
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