feat: adds the VerticalBlockChildRenderStarted filter#38
Conversation
|
👍
|
mariajgrimaldi
left a comment
There was a problem hiding this comment.
This definition looks good! In the next few days, I'll test the full feature with openedx-edit-links & the Open edX PR. Sorry for the delay!
|
This was quite fun to test! I'll attach a screenshot: Thanks for your contribution again. I'm just a bit hesitant on the filter type: FYI @felipemontoya |
|
vertical_block_child -> this would be any xblock that can be added vía the studio interface, correct? |
|
@mariajgrimaldi @felipemontoya Yes. This is any block added to a unit. |
|
@mariajgrimaldi I have updated the filter name to |
mariajgrimaldi
left a comment
There was a problem hiding this comment.
This looks great! Let me know when it's ready for merging
This adds the VerticalBlockChildRenderStarted filter which passes the child XBlock and it's rendering context dictionary to the filter allowing the filter pipeline to alter the content of the XBlock based on the context. Private-ref: https://gitlab.com/mooc-floss/mooc-floss/-/issues/112
1989c46 to
62663a7
Compare
|
@mariajgrimaldi Thank you. I have made the following updates to the PR.
With the above changes, I think this is ready for merging. The only item missing in the checklist is documentation. I checked the docs folder to see if there is any relevant documentation that I could update, didn't find any filter specific changes that are required. Let me know if I have overlooked something here. |
|
Thanks! @tecoholic We have a hooks guide listing the current filters here. We're currently figuring out how to better document filters and events, but that's the primary reference that should be updated. Feel free to edit it & let me know for a review. |
|
I opened this issue regarding docs improvement. As a filters adopter, do you think there's something else meaningful to add? |
|
@mariajgrimaldi Thank you merging this :) And also the link to the place where the hooks are documented, I will add the documentation and make it a part of the PR openedx/openedx-platform#30773. #41 looks like a good improvement for the library. I will be able to contribute some way as well. It would be of huge help for the community in general. Eg., Discussion on implementing tag management |

Description:
This adds the
VerticalBlockChildRenderStartedfilter which passes the child XBlock and it's rendering context dictionary to the filter allowing the filter pipeline to react to the content of the XBlock based on the context.This is a follow up of the PoC implemented in PR #35. The filter attempted in the previous PR was poorly placed and was limiting. The filter introduced in this PR provides a better opportunity for plugin's to enhance the experience based on the XBlock being rendered.
The Edit Links PR open-craft/openedx-edit-links#1 shows one such use-case of adding extra HTML to the content of HTML Block before rendering.
JIRA: Link to JIRA ticket
Dependencies:
Merge deadline: NA
Installation instructions:
Ensure that
edx-platformis checked out to branch of openedx/openedx-platform#30773Testing instructions:
Unit tests are added for the filter. For full feature test, follow testing instructions from open-craft/openedx-edit-links#1
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns:
NA