fix(redwood): show correct icons in the sidebar for units with custom XBlocks - #726
Merged
farhaanbukhsh merged 1 commit intoAug 20, 2025
Conversation
Agrendalath
force-pushed
the
agrendalath/bb-9332-unit-icons-for-custom-xblocks
branch
from
January 6, 2025 23:11
41fe7b1 to
7f0c3db
Compare
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
force-pushed
the
agrendalath/bb-9332-unit-icons-for-custom-xblocks
branch
from
August 20, 2025 16:26
b867f68 to
1e66adb
Compare
farhaanbukhsh
approved these changes
Aug 20, 2025
farhaanbukhsh
left a comment
Member
There was a problem hiding this comment.
👍
- ✅ I tested this on tutor devstack
- ✅ I read through the code
- ❌ I checked for accessibility issues
- ❌ Includes documentation
farhaanbukhsh
merged commit Aug 20, 2025
7ccf5d6
into
opencraft-release/redwood.1
16 of 75 checks passed
farhaanbukhsh
deleted the
agrendalath/bb-9332-unit-icons-for-custom-xblocks
branch
August 20, 2025 19:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a Redwood backport of openedx#36135.
Private-ref: BB-9332