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.
This recreates the Zooming Image Tool template for the HTML block. It
does it in such a way that doesn't depend on any external resources:
both the loupe code and sample image are inlined.
Some benefits to this version are:
* We can now maintain the loupe javascript code properly
* Because the javascript is included in the contents of the block
itself, the course author can customize it as needed
* As opposed to the previous iteration, the magnified image URL is now
optional: if it's not present, the regular image will be used for
magnification
* There can now be two or more instances of the tool in the same unit.
This also removes some CSS left over from the previous iteration.
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>
* feat: add share link modal when hide from toc is enabled
Adds a new button in the child subsections of sections with Hide From TOC enabled.
This button displays a new modal with two tabs. The first tab displays a button
that allows you to copy the link of that subsection to the clipboard. The second
tab displays a button that allows you to copy the embedded link of the same
subsection to the clipboard.
Ref: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
Exposes the hide_from_toc xblock attribute so course authors can configure it as a section visibility option in Studio. Before this change, the Hide from TOC functionality was mainly used by OLX components. Hence, it wasn't available for configuration through the Studio UI. Still, its implementation existed in the platform and could be used by setting the attribute: hide_from_toc=true as part of the OLX definition.
Ref: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
* style: drawer-cover color updated for all tagging drawers
* feat: Update TagList component when a tag is updated on Manage tags drawer
* feat: Refactor TagCount to be able to refresh the count
* feat: Sync tag count in units
Refactors and reworks the LibraryContentBlock so that its
sync-from-library operations are asynchronous and work with
V2 content libraries. This also required us to make
library_content block duplication asynchronous, as that
involves syncing from the source library.
For the sake of clarity, this PR includes two major method renames:
* update_children(...) -> sync_from_library(...)
* refresh_library(...) -> sync_from_library(upgrade_to_latest=True, ...)
an an XBlock HTTP handler rename:
/refresh_children -> /upgrade_and_sync
There are still a couple issues with import or duplication
of library_content blocks referencing V2 libraries other than
latest. These will be resolved in an upcoming PR.
Part of: https://openedx.atlassian.net/wiki/spaces/COMM/pages/3820617729/Spec+Memo+Content+Library+Authoring+Experience+V2
Follow-up work: https://github.com/openedx/edx-platform/issues/33640
Co-authored-by: Connor Haugh <chaugh@2u.com>
Co-authored-by: Eugene Dyudyunov <evgen.dyudyunov@raccoongang.com>
Uses the updated styles for the notification based on the new designs.
Includes a button to open view the files directly in the notification.
This also fix a bug where the notification was not appearing when paste
a whole Unit.
* feat: Implement paste button
* chore: improve docs and add tests for python API
* fix: drive-by fix to use a better API for comparing XML
* feat: track which XBlock something was copied from
* feat: add tests
* feat: enable import linter so content_staging's public API is respected
* fix: error seen when trying to paste drag-and-drop-v2 blocks
* fix: use strip_text=True consistently for XML comparisons
* refactor: rename get_user_clipboard_status to get_user_clipboard
* feat: Better error reporting when pasting in Studio
* chore: convert new test suite to pytest assertions
* refactor: push READY status check into the API per review suggestion
* fix: use strip_text=True consistently for XML comparisons
* fix: store "copied_from_block" as a string to avoid Reference field issues
* fix: minor lint error
* refactor: move data types to data.py per OEP-49
Adds a UI in studio to toggle discussions for a units if a course is using a discussion provider that supports it and per-unit discussion control is enabled.
Co-authored-by: Kshitij Sobti <kshitij@opencraft.com
Co-authored-by: Agrendalath <piotr@surowiec.it>
feat: AA-883 basic prototype for custom pacing pls in studio
refactor: merge with basic prototype for self paced courses from AA-844
feat: add due date estimate message in self paced courses studio modal
refactor: merge with main that has up to date self paced custom pls editor and tests
fix: only display projected date if start date exists
fix: tests to check grading date in outline
fix: only one warning message show at a time
fix: do not show projected date when it is before the start date
Author needs to have a quick access to ORA menu in order
to get proceed with assesment design. This introduces ORA
button to the tray.
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
* Fix all stylelint errors
For any errors that fixing would require changing the output of the css disable stylelint for that line instead of modifying.
* Update quality.py
Make stylelint quality check pass when there are no errors
* Delete empty selectors
Improves navigation within Studio for Learning Sequences, speeding up authors who want to see how a learner progresses through content without needing to jump over to the LMS.
This adds a dropdown section navigator to the breadcrumbs on the unit page and copies the sequence navigator from LMS to the studio unit page.
* Enlarges component modal for easier editing
* Allows display name to be edited in place
* Improves markdown button labeling
* Moves markdown cheatsheet to the edit modal, for quick reference
Some deprecated functionality has been removed:
- Reading data field and transforms being applied in the init() method.
- The source field.
- The source_visible attribute.
Initial changes to gate section based on completion percentage
code refactoring and added evaluation of completion milestone
Fixed broken unit tests and added new tests
Fixed broken tests and quality violations
Fixed Pep8 violation
Fixed eslint quality violations
Test changes as suggested by reviewer
changes after feedbacy from reviewer
Update the docstring with suggested changes
excluding chapter from the blocks
Disallow empty values for min score and min completion
Changes afte feedback from UX/Accessibility
removed blank line