Skip to content

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

Merged
farhaanbukhsh merged 1 commit into
opencraft-release/redwood.1from
agrendalath/bb-9332-unit-icons-for-custom-xblocks
Aug 20, 2025
Merged

fix(redwood): show correct icons in the sidebar for units with custom XBlocks#726
farhaanbukhsh merged 1 commit into
opencraft-release/redwood.1from
agrendalath/bb-9332-unit-icons-for-custom-xblocks

Conversation

@Agrendalath

@Agrendalath Agrendalath commented Jan 6, 2025

Copy link
Copy Markdown
Member

This is a Redwood backport of openedx#36135.

Private-ref: BB-9332

@Agrendalath Agrendalath self-assigned this Jan 6, 2025
@Agrendalath
Agrendalath force-pushed the agrendalath/bb-9332-unit-icons-for-custom-xblocks branch from 41fe7b1 to 7f0c3db Compare January 6, 2025 23:11
@Agrendalath
Agrendalath marked this pull request as ready for review January 20, 2025 20:38
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 b867f68 to 1e66adb Compare August 20, 2025 16:26

@farhaanbukhsh farhaanbukhsh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

  • ✅ I tested this on tutor devstack
  • ✅ I read through the code
  • ❌ I checked for accessibility issues
  • ❌ Includes documentation

@farhaanbukhsh
farhaanbukhsh merged commit 7ccf5d6 into opencraft-release/redwood.1 Aug 20, 2025
16 of 75 checks passed
@farhaanbukhsh
farhaanbukhsh deleted the agrendalath/bb-9332-unit-icons-for-custom-xblocks branch August 20, 2025 19:01
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.

3 participants