3167 Commits

Author SHA1 Message Date
Feanil Patel
8048dbfb3a fix: exclude test entry points from karma sourceFiles patterns
In karma 6, files matched by earlier patterns aren't overridden by later
patterns. The sourceFiles patterns like `cms/**/!(*spec|djangojs).js`
matched test entry files (e.g., `cms/js/spec/main.js`) because they
don't end with "spec" or "djangojs". This prevented runFiles from
setting `included: true` on these files, so tests never started.

Split the sourceFiles patterns to precisely exclude spec/main*.js test
entry points while still serving other source files:
- Direct children of the js directory
- Subdirectories except spec/
- spec/ subdirectory, excluding main* files

This allows runFiles to control test entry point inclusion.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 10:13:18 -05:00
Rômulo Penido
85e81b32e4 feat: add full screen modal option to base_modal (#38001)
Adds a "Fullscreen" button to the iframe editors for advanced XBlocks
2026-02-27 16:12:04 +00:00
Feanil Patel
7c9f468d56 refactor: Drop the unused legacy video upload page.
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>
2026-02-26 15:59:57 -05:00
Chris Chávez
5e75d3cce4 feat: Make selectable component cards (#38010)
- 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
2026-02-18 20:34:35 +00:00
Chris Chávez
3c4cf0e2d2 fix: Nits on styles of library icon [FC-0114] (#37980)
- Fixes the issues described in https://github.com/openedx/frontend-app-authoring/issues/2762#issuecomment-3837508959:
    - Changed the background color for the library icon in the unit page.
    - Update punctuation for the library icon tooltip in the unit page.
    - Allows breaking the tooltip into multiple lines.
2026-02-09 22:10:38 +00:00
bydawen
d06ff7d2ca fix: fixed styles for legacy xblock's editor (#36923)
These changes make the legacy XBlock editors look more visually consistent with the Paragon-based components used everywhere else in the platform.
2026-01-19 16:24:17 -08:00
Irtaza Akram
474dc71f0d chore: remove legacy problem studio view (#37795)
* fix: remove legacy problem studio view and resource templates
2026-01-08 13:07:15 +05:00
Chris Chávez
a032955243 feat: New states for library info icon in components in Unit page (#37735)
- Adds `upstream_name` to the `UpstreamLink` dataclass.
- Add new states to library info icon in components in Unit page
2025-12-16 19:18:24 +00:00
Feanil Patel
b1f01ed8fa feat!: Drop the legacy Tabs UI (#37557)
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>
2025-11-20 23:36:10 +00:00
Feanil Patel
d929cdb7fa feat!: Drop the legacy studio updates page. (#37544)
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.
2025-11-20 23:00:13 +00:00
Feanil Patel
5d0d60d426 feat!: Drop support for the legacy textbooks page. (#37545)
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.
2025-11-20 17:56:11 -05:00
Feanil Patel
3c5cc6fffd fix: Adding components to xblocks with children.
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.
2025-10-23 15:57:01 -04:00
Ihor Romaniuk
900706b1e5 fix: improve styling of headers+lists in LMS+Studio (#34867) 2025-10-20 17:26:03 -07:00
Navin Karkera
744cc87ffb feat: follow migrated legacy library content block (#37405)
* 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
2025-10-20 11:20:37 +05:30
Feanil Patel
e68eab9e5b feat: Drop the legacy_studio.text_editor flag.
Remove the flag and update the code paths as if it's always set to true.
2025-10-16 15:01:36 -04:00
Kyle McCormick
20bc7113e3 feat!: Remove Studio Maintenance & Announcements (#37432)
The announcements editor was never ported to frontend-app-authoring, and
the announcements display was never ported to frontend-app-learner-dashboard.
This announcements feature is rarely used, undocumented, non-a11y-friendly, and
there were no volunteers to port it to the new frontends. It is the last
remaining part of the legacy Studio "Maintenance" dashboard. So, we are
removing it.

BREAKING CHANGE: This removes...
* Studio Maintenance dashboard legacy frontend
* Studio Edit Announcements legacy frontend
* The snippet of legacy learner dashboard which renders announcements
* openedx/features/announcements djangoapp
* The ENABLE_ANNOUNCEMENTS feature flag

Not removed:
* The announcements_announcement table from openedx/features/announcements .
  The table is most likely very small, as it is only populated by administrators. Removing
  it would be more labor for us and more risk of toil for operators than is worthwhile.

Closes: https://github.com/openedx/edx-platform/issues/36263
2025-10-10 12:48:00 -04:00
Chris Chávez
51bfd3febe feat: Add blockType to xblockPreview & title to xblock_iframe [FC-0097] (#37362)
- 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
2025-09-29 23:27:32 +00:00
Navin Karkera
a11086ffac feat: allow editing imported text blocks (#37124)
* 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
2025-09-17 14:50:24 +05:30
Rômulo Penido
8085bf6be4 feat: Add unlinkable to xblock actions and update top_level_parent_key on unlink [FC-0097] (#37215)
- 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.
2025-08-28 16:30:17 +00:00
Sara Burns
405282c17e feat!: Make MFE scroll content instead of iFrame when scrollToXblock is called 2025-08-20 01:32:14 +05:30
Chris Chávez
30ace04469 fix: clear buttons in advanced components editors in Libraries (#36752) 2025-05-21 11:03:39 +09:30
Daniel Valenzuela
c20e6ec7f3 fix: open mfe modal editor of new duplicated xblock (#36641)
When duplicating an xblock in the authoring MFE, the iframe was opening its own editor modal instead of the MFE modal.
2025-05-20 21:29:32 +00:00
ihor-romaniuk
6366592dd0 fix: improve calculation for xblock action dropdown menu on unit page 2025-05-01 14:42:04 -03:00
ihor-romaniuk
389547cc2b fix: unit xblock adaptivity and small visual enhancements 2025-04-30 16:56:28 -03:00
Chris Chávez
54ec998bee fix: Broken CSS styles of ora2 block editor [FC-0076] (#36220)
* It was this error 'Uncaught TypeError: el.timepicker is not a function' while rendering the editor. It's fixed adding the timepicker pluging in xblock_v2/xblock_iframe.html
* Added '.openassessment_cancel_button' and '.openassessment_save_button' as action buttons.
* Use openassessment manifest.json to load css from dist
2025-04-22 21:08:02 +00:00
Arunmozhi
9f299df3a0 feat: adds scrollToXBlock message handler for cms iframe view (#36478)
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.
2025-04-15 22:00:31 +05:30
Ihor Romaniuk
f5c17bb88c feat: [FC-0070] add events and style for rendering Split xblock in chromeless template (#35813)
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.
2025-03-31 18:31:59 -03:00
Robert Raposa
399be67fc4 style: remove eslint with frontend code removal ADR
- Add ADR for frontend code removal
- Drop eslint, as explained in the ADR
2025-03-20 11:03:41 -04:00
Braden MacDonald
3b5edaa1ad chore: fix a few JS lint issues that eslint is warning about (#36177) 2025-03-13 10:08:02 -07:00
Peter Kulko
cf7e45cf4d feat: manage tag events for new Unit page (#35751) 2025-03-03 10:59:05 -03:00
Peter Kulko
0319d62a78 feat: course unit - edit iframe modal window (#35777)
Adds logic to support the functionality of editing xblocks via the legacy modal editing window.
2025-02-20 17:02:43 -03:00
Kyle D. McCormick
6124695fdf refactor: Remove broken Force-Publish UI from Studio
Co-Authored-By: Feanil Patel <feanil@axim.org>
2025-02-19 09:07:57 -05:00
Kyle McCormick
569c2d9ad2 Revert "fix: Remove pointless Maintenance and Announcement apps (#35852)"
This reverts commit 9274852f2d.
2025-02-19 09:07:57 -05:00
Chris Chávez
d29ff63e2c fix: Render Word cloud block editor in libraries [FC-0076] (#36199)
* 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>
2025-02-19 18:05:55 +05:30
Chris Chávez
0bede61246 fix: Advanced editor styles [FC-0076] (#36221)
* Adds padding to the text of the competition block editor.
* Fix the style of the Save and Cancel buttons of the PDF block editor.
* Moves the Save and Cancel buttons to the bottom of the modal.
* Moves the Save and Cancel button to the right.
* Which edX user roles will this change impact? "Course Author"
2025-02-13 11:21:32 -05:00
Muhammad Faraz Maqsood
9ae7566b1c fix: studio edx.org-next theme
Attaching jira ticket for reference: https://2u-internal.atlassian.net/browse/TNL-11731

- compile_sass script was generating the `studio-main-v1.scss` file but it wasn't correct and wasn't picking the changes from paragon. As a result, `edx.org-next` theme wasn't being applied to the studio. And the reason was this line: https://github.com/openedx/edx-platform/pull/35233/files#:~:text=//%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D-,%40import%20%27_builtin%2Dblock%2Dvariables%27%3B,-%40import%20%27bourbon.
- This PR fixes the studio theme as I have rearranged `studio-main-v1.scss` file so that theme changes can be applied correctly.
2025-02-12 18:29:59 +05:00
Peter Kulko
925716415c chore: iframe rendering optimization (#35959)
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.
2025-02-11 16:30:38 -03:00
Saad Yousaf
eaf6f66828 fix: styling fix for course optimizer legacy tool link 2025-02-07 15:46:19 +05:00
Raymond Zhou
02fc9c928f 2u/course optimizer (#35887) 2025-02-06 12:47:17 -05:00
Rômulo Penido
4f13ee0171 fix: advanced editor styling on library authoring [FC-0076] (#36146)
Fixes the styles for the advanced editors (poll, survey, LTI Provider, etc). Updated the code if `xblock_v2/xblock_iframe.html` to use `course-unit-mfe-iframe-bundle.scss`
2025-01-30 17:36:21 +00:00
Ihor Romaniuk
8aeaaf4e21 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.
2025-01-16 14:05:26 -03:00
Peter Kulko
755bf98091 feat: [FC-0070] Listen to xBlock interaction events (#35694)
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.
2025-01-14 11:56:51 -05:00
Navin Karkera
e6ddd9c7c1 refactor: remove unnecessary padding from lib component picker (#36073)
Library component picker and Problem bank picker iframe had unnecessary
padding resulting in multiple border/shadow in the modal.
2025-01-10 10:30:58 -05:00
Adolfo R. Brandes
f4d110c896 feat: Reimplement the Zooming Image Tool
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.
2024-12-13 11:34:28 -03:00
Kyle McCormick
9274852f2d fix: Remove pointless Maintenance and Announcement apps (#35852)
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.
2024-11-26 15:15:27 +00:00
Navin Karkera
73ba58ae11 feat: iframe messaging for component picker in problem bank (#35888) 2024-11-22 11:44:13 -05:00
Navin Karkera
49330a222a feat: post message on preview library block changes (#35861)
Posts message with library xblock changes info instead of displaying a modal if the unit is rendered in an iframe.
2024-11-19 19:07:28 +00:00
ihor-romaniuk
a34a54d29f feat: [FC-0070] add message events to the unit page container 2024-11-18 11:23:33 -03:00
Rômulo Penido
cb1e6eeb3f fix: error while loading iframe on mfe Unit Outline [FC-0062] (#35828)
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.
2024-11-15 17:54:56 +00:00
Navin Karkera
d9f6afa264 feat: add beta flag to component templates (#35802)
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.
2024-11-13 18:27:54 +00:00