feat: [FC-0070] add message events and styles to the library content page (#35785)

This introduces improvements for XBlock interactions within iframes:

* Add default styles for Library Content that renders in the iframe in the new Studio unit page
* When the `isIframeEmbed` option is enabled, the XBlock sends a `postMessage` to the parent window. When sending such a message, the standard link transition is cancelled and the transition is carried out in the MFE.
This commit is contained in:
Ihor Romaniuk
2025-01-16 18:05:26 +01:00
committed by GitHub
parent b885618ae1
commit 8aeaaf4e21
5 changed files with 113 additions and 28 deletions

View File

@@ -265,9 +265,10 @@ class GetItemTest(ItemTest):
html,
# The instance of the wrapper class will have an auto-generated ID. Allow any
# characters after wrapper.
'"/container/{}" class="action-button">\\s*<span class="action-button-text">View</span>'.format(
re.escape(str(wrapper_usage_key))
),
(
'"/container/{}" class="action-button xblock-view-action-button">'
'\\s*<span class="action-button-text">View</span>'
).format(re.escape(str(wrapper_usage_key))),
)
@patch("cms.djangoapps.contentstore.xblock_storage_handlers.xblock_helpers.get_object_tag_counts")