The legacy video uploads page in Studio has been replaced with a new
view in the Authoring MFE. The legacy page has not been available for
some time, so it's all dead code. This PR removes it.
Please note that there's a waffle flag which enables the MFE version
of the video uploads page: `contentstore.new_studio_mfe.use_new_video_uploads_page`.
Unlike the other Studio MFE waffles, we're NOT going to remove this one now,
because the video uploads page has always been broken for sites other
than edx.org (or sites that have reverse-engineered their video pipeline) so
we'd like to keep the flag until it's either fixed for the community or
removed (https://github.com/openedx/openedx-platform/issues/37972).
This work is part of https://github.com/openedx/edx-platform/issues/36108
Co-Authored-By: Kyle McCormick <kyle@axim.org>
- Styles to make component cards selectable.
- Action to select a component and send a message to the parent of the iframe
- Handler for a "deselect all" message and for selecting a specific component
This change drops the legacy studio custom pages UI aka. the tab edit
page.
This work is part of https://github.com/openedx/edx-platform/issues/36108
BREAKING CHANGE: The 'legacy_studio.custom_pages' waffle flag has been
removed and the code will work as if this flag is permanently set to
False.
Co-authored-by: Kyle McCormick <kyle@axim.org>
Remove the legacy studio updates page and its related artifacts. They
have been replaced by API and a new UI in the authoring MFE.
This cleanup is a part of https://github.com/openedx/edx-platform/issues/36108
BREAKING CHANGE: The 'legacy_studio.updates' waffle flag will no longer
be respected. The system will behave as if the flag is set to false
permanently.
The legacy textbooks page has been replaced with an authoring MFE
equivalent. We don't need to keep the old one around.
This work is part of https://github.com/openedx/edx-platform/issues/36108
BREAKING CHANGE: With this change the `legacy_studio.textbooks` waffle
flag will no longer be respected and the system will behave as if the
flag is always set to False.
Previously the container JS would remove the `add-xblock-component` for
every component that was in an iframe that was not the split test
component. We're changing the logic to say that we should not render
the old buttons on pages where the authoring view provides an
alternative set of buttons. Which in this case is just the
unit/vertical page. All other containers should render the old buttons
since the new authoring MFE does not provide them.
* feat: show item bank ui for migrated legacy library content
* feat: migrate legacy content block to item bank block on view in studio
* fix: duplicate and copy issues
* refactor: migration location and add tests
* fix: lint issues
* fix: item bank and library content children view add button functionality
Newly added blocks from library in children view page of item bank block
and migrated library content block were not displayed automatically.
* fix: lint issues
* fix: lint issues
* feat: only migrate if same version of library is migrated
* refactor: migrate block on request
* fix: component reload on migration
* fix: tests
* refactor: comments and message wordings
* refactor: update alert text
* docs: add context
* fix: component links not being created on migrating legacy blocks
* fix: api docs and types
* refactor: use inheritance and specific parent method call
* fix: imports
* fix: api typing
* fix: upstream_version check
* refactor: rename variables
* refactor: parsing entity keys to usage_keys
- Adds `blockType` and `is_modified` to the `showXBlockLibraryChangesPreview` iframe message.
- Add title to the `xblock_iframe`
- Add `is-modified` to `studio_xblock_wrapper`
- Add `disable_staff_debug_info` as a query param in `render_xblock`
- `downstream_is_modified` added to ComponentLink and ContainerLink
* feat: allow editing html block imported from upstream
The modified field is left untouched in future sync while storing the
upstream values in hidden fields to allow authors to revert to upstream
version at any point.
* fix: sync downstream_customized field for copy-pasted modified block
* test: add more tests
* fix: lint issues
* test: copy paste
* feat: skip sync if html data is modified
* feat: update upstream fields only when modified
* refactor: use version_synced field to skip sync
* feat: edit title inplace for library source components
* fixup! feat: edit title inplace for library source components
* fix: edit title button style
* fix: test case
* fix: lint issue
* refactor: don't show different icon for modified upstream blocks
* Revert "refactor: use version_synced field to skip sync"
This reverts commit 8b784fff2f49b43702c952e7f955bd4048e8cc69.
* feat: only skip sync for modified blocks if updated as part of container
* refactor: update sync behaviour when synced individually and as part of parent
* feat: include ready to sync children info in downstream link get api
* test: fix failing tests
* fix: lint issues
* feat: new tests and update api to allow overriding modified fields in sync
* test: api changes
* refactor: edit options should be visible for individual imports
* docs: update api docs
* chore: remove old comments
- Adds the `unlinkable` action to the XBlock object sent to the frontend
- Updates the `top_level_parent_key` reference when unlinking containers. If you unlink a Section with Subsections and Units, this updates the `top_level_parent_key` for the Subsections to `None` (they are the top level now), and the `top_level_parent_key` for the Units to the corresponding parent Subsection.
This commit adds a new message handler to the XBlockContainerPage
CMS view, that allows the MFE to send a signal to the IFrame
and scroll to a specific XBlock.
This feature introduces functionalities to improve XBlock interactions within iframes:
* Add styles that adopt default styles for Split Test which renders chromless template via iframe in MFE Authoring.
* 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 MFE Authoring.
* fix: Render Word cloud and conditional block editor
- The xmodule-type to render is MetadataOnlyEditingDescriptor
- The xmodule type `MetadataOnlyEditingDescriptor` renders a `<div>` with the block metadata in the `data-metadata` attribute. But is necessary to call `XBlockEditorView.xblockReady()` to run the scripts to build the editor using the metadata.
- To call XBlockEditorView.xblockReady() we need a specific require.config
* fix: Adding save and cancel button
* fix: save with studio_submit of conditional_block and word_cloud_block
* test: Tests for studio_submit of conditional and word cloud
* revert: Delete studio_submit of conditional block. It is not supported
* style: Fix lint
---------
Co-authored-by: Navin Karkera <navin@opencraft.com>
Iframe reload optimizations for various xblock related actions. Added some improvements related to scrolling to the current xblock. Fixed behavior of the xblock action dropdown list.
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 is part of the effort to support the new Studio Unit Page embedded in the authoring MFE. It introduces several changes to improve the handling of XBlock events and the user interface in the CMS. The most important changes include adding event listeners for message handling, refining the postMessage logic, and updating the CSS for better visual consistency.
The Studio Maintenance app had two features:
* "Force Course Publish", which literally doesn't do anything. All it
does is tell you what version *would* be seen by users *if* the course
were to be published--no publishing actually occurs via this feature.
* "Announcements", which writes to the announcements_announcement
database table, but doesn't actually display anywhere.
Having these pages in the platform is actively misleading and creates a
maintenance burden for edx-platform developers, so we remove them.
Note that this commit does not include a migration for the announcements
Django app. So, announcements_announcement table will not be deleted.
Given the small expected size of any past-authored announcements, we are
not worried about leaving them in the database perpetually.
On the Course unit page after merging the PR with new iframe for xblocks, an issue with infinite loading of the iframe appeared if the unit/xblock has tags. This PR solves the problem with the error that appeared. Addition and processing of the tagging functionality is planned in future PRs.
Mark components like libraryv2 and problem bank beta in API to be used by both legacy templates and new authoring mfe.
Also updates order of components.
* fix: problem block could not be used with versioned handler URls
* refactor: simplify REST API handling of usage keys
* feat: add more version awareness and update tests
* fix: make the preview changes modal bigger as requested
* refactor: parse version at the urlconf layer too
The first attempt at creating a new MFE-driven page for Studio Unit
rendering involved rendering each XBlock separately in its own iframe.
This turned out to be prohibitively slow because of the many redundant
assets and JavaScript processing (e.g. MathJax) that happens for each
XBlock component.
In order to mitigate some of these issues, we decided to try a hybrid
approach where we render the entire Unit's worth of XBlocks at once on
the server side in a Studio view + template, and then invoke that from
frontend-app-authoring as an iframe. The frontend-app-authoring MFE
would still be responsible for displaying most of the interactive UI,
but the per-component actions like "edit" would be triggered by buttons
on the server-rendered Unit display. When one of those buttons is
pressed, the server-rendered UI code in the iframe would use
postMessage to communicate to the frontend-app-authoring MFE, which
would then display the appropriate actions.
To make this work, we're making a new view and template that copies
a lot of existing code used to display the Unit in pre-MFE Studio, and
then modifying that to remove things like the header/footer so that it
can be invoked from an iframe.
This entire design is a compromise in order to do as much of the UI
development in frontend-app-authoring as possible while keeping
XBlock rendering performance tolerable. We hope that we can find
better solutions for this later.
Authored-by: Sagirov Eugeniy <evhenyj.sahyrov@raccoongang.com>
Make the edit button on a container page for a non-unit block
(i.e. an individual text, problem or video block) open the new
editor when the relevant flag is enabled.
* feat: make tagging feature enabled by default
* fix: use the correct flag for tagging enabled
* fix: make compatible with other changes from master
* fix: more compatibility fixes
* fix: show tag counts at all levels of the outline, not just units
* chore: typo
* test: fix counts in test suite now that tagging is on by default
---------
Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>