Skip to content

Conversation

@tecoholic
Copy link
Contributor

@tecoholic tecoholic commented May 19, 2025

Description

The sidebar slot in the Course Unit page wrapped only a partial set of components that are being rendered when the unit is of 'vertical' type. This leads to 2 issues:

  • the sidebar slot will not be rendered when the unit
    is not of vertical type
  • the slot's position in the UI is inconsistent between
    the Course Outline page and Course Unit page

In this PR, all the elements of the sidebar column are wrapped into the slot.

Useful information to include:

  • Which edX user roles will this change impact? "Course Author" and "Developer".
  • Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable). - No UI changes.
  • Provide links to the description of corresponding configuration changes. Remember to correctly annotate these changes. - N/A

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 19, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented May 19, 2025

Thanks for the pull request, @tecoholic!

This repository is currently maintained by @bradenmacdonald.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions May 19, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions May 22, 2025
@tecoholic tecoholic force-pushed the tecoholic/BB-9725-refactor-course-unit-sidebar branch from 5980239 to 1955b79 Compare May 23, 2025 09:00
@tecoholic tecoholic requested a review from farhaanbukhsh May 23, 2025 09:22
@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.03%. Comparing base (c5f7d0c) to head (1775519).
Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2000      +/-   ##
==========================================
+ Coverage   93.95%   94.03%   +0.07%     
==========================================
  Files        1155     1163       +8     
  Lines       24129    24443     +314     
  Branches     5236     5190      -46     
==========================================
+ Hits        22671    22984     +313     
- Misses       1381     1391      +10     
+ Partials       77       68       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tecoholic tecoholic marked this pull request as ready for review May 23, 2025 09:38
tecoholic added 3 commits May 24, 2025 21:23
The sidebar slot in the Course Unit page wrapped only
a partial set of components that are being rendered when
the unit is of 'vertical' type. This leads to 2 issues:
* the sidebar slot will not be rendered when the unit
  is not of `vertical` type
* the slot's position in the UI is inconsistent between
  the Course Outline page and Course Unit page

In this commit, all the elements of the sidebar column are
wrapped into the slot.
@tecoholic tecoholic force-pushed the tecoholic/BB-9725-refactor-course-unit-sidebar branch from 9b98278 to c2467e8 Compare May 24, 2025 11:24
Copy link
Member

@farhaanbukhsh farhaanbukhsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • ✅ I tested this on Tutor devstack
  • ✅ I read through the code
  • ❌ I checked for accessibility issues
  • ✅ Includes documentation

@farhaanbukhsh
Copy link
Member

@brian-smith-tcril Please review this PR when you find sometime. 😄

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is changing what the slot wraps, we need to handle this as a breaking change. That means:

  • The updated CourseAuthoringUnitSidebarSlot should have a top-level PluginSlot component with an id of org.openedx.frontend.authoring.course_unit_sidebar.v2.
  • In order to handle the breaking change with expand/contract, we should have at least one release where both v1 and v2 exist.
    • This means the CourseAuthoringUnitSidebarSlot should also have a PluginSlot component with a v1 id wrapping what v1 currently wraps
  • After this lands, we'll want to make a DEPR for the v1 version of the slot.

Pseudocode:

<PluginSlot id="v2">
  [...]
  <PluginSlot id="v1">
     [...]
  </PluginSlot>
  [...]
</PluginSlot>

@tecoholic
Copy link
Contributor Author

@brian-smith-tcril Thanks for the review and the guidelines. I will ping you again after updating the PR.

tecoholic added 2 commits June 4, 2025 15:25
The commit wraps the newly added components as the
slots's v2 while keeping the original slot component
tree as slot v1.
@tecoholic
Copy link
Contributor Author

@brian-smith-tcril I have updated the component and the docs. A couple of notes:

  • I have left the idAliases with the version 1, which I think makes it backward compatible for existing plugins. This would be moved over to the plugin slot v2 when v1 is deprecated.
  • I haven't added separate examples for V1 and V2 and instead updated it to use the v2 slot as it is superset in terms of functionality and we are planning to DEPR v1 soon after this.

Kindly take another look.

@farhaanbukhsh
Copy link
Member

@brian-smith-tcril @tecoholic Please cross-check and make sure

https://github.com/openedx/tutor-contrib-aspects/blob/main/tutoraspects/plugin.py#L714

we are align with the above changes. Thanks in advance.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking great! I left some docs notes inline, and I'd also like to respond to #2000 (comment)

I have left the idAliases with the version 1, which I think makes it backward compatible for existing plugins.

That is perfect.

This would be moved over to the plugin slot v2 when v1 is deprecated.

The alias should not be moved over for v2, as it is specifically an alias for the v1 version of the slot. If someone has a plugin that is using that alias, it is designed for the v1 slot, and it will not behave as expected if it goes into the v2 slot.

I haven't added separate examples for V1 and V2

That makes perfect sense. The example screenshots will be identical for both v1 and v2.

and instead updated it to use the v2 slot as it is superset in terms of functionality and we are planning to DEPR v1 soon after this.

I mentioned this in the inline comment about the docs, but I think it makes more sense to keep the v1 and v2 docs a bit more separate. We can use the same screenshots for both though!


And re: #2000 (comment)

Please cross-check and make sure

https://github.com/openedx/tutor-contrib-aspects/blob/main/tutoraspects/plugin.py#L714

we are align with the above changes. Thanks in advance.

This PR will not change the behavior of the course_authoring_unit_sidebar_slot alias - that will still correspond to the org.openedx.frontend.authoring.course_unit_sidebar.v1 slot.

If the goal is to render that plugin when the unit is a type other than vertical - then once this PR lands the id in the aspects plugin should be updated to the v2 id.

Comment on lines 3 to 4
The component currently holds 2 versions of the slot. Version 2 wraps version 1 and hence, is a
superset of version 1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the goal is to deprecate the v1 version of this slot, I think it would make more sense to more cleanly split this documentation up instead of having info about both v1 and v2 in each section.

I think either having a README.v1.md file that README.md links to or having 2 top-level sections in the README would make it a lot easier to remove all the v1 documentation when we're ready to remove the v1 slot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with your first suggestion of adding a README.v1.md file.

@tecoholic
Copy link
Contributor Author

@brian-smith-tcril Hi, I have updated the docs to reflect you suggestions around versioning. Please take another look.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking great! Couple small docs comments but this is almost ready to land!

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working with me through the review process! This looks great!

@brian-smith-tcril brian-smith-tcril merged commit 73ac6d7 into openedx:master Jun 10, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in Contributions Jun 10, 2025
@tecoholic
Copy link
Contributor Author

@brian-smith-tcril Thank you for your patience and steering the work towards upto date docs and conformance to standards.

Can I open another PR just deprecating the V1 slot? Or should we wait a release or something like that?

@brian-smith-tcril
Copy link
Contributor

@tecoholic it will need to go through the deprecation process

and both versions will need to coexist for at least 1 release

Keep the definition of the previously released version of the slot in the codebase for the duration of the deprecation process, which should include at least one Open edX release where it co-exists with the new version

@tecoholic
Copy link
Contributor Author

@brian-smith-tcril Thank you.

tecoholic added a commit to open-craft/frontend-app-authoring that referenced this pull request Jun 17, 2025
ihor-romaniuk pushed a commit to raccoongang/frontend-app-authoring that referenced this pull request Jun 19, 2025
ihor-romaniuk pushed a commit to raccoongang/frontend-app-authoring that referenced this pull request Jun 20, 2025
luisfelipec95 pushed a commit to eduNEXT/frontend-app-course-authoring that referenced this pull request Jul 4, 2025
luisfelipec95 pushed a commit to eduNEXT/frontend-app-course-authoring that referenced this pull request Jul 7, 2025
DeimerM added a commit to eduNEXT/frontend-app-course-authoring that referenced this pull request Sep 16, 2025
* refactor: remove custom order function from course libraries list (openedx#1865) (openedx#1888)

(cherry picked from commit bc18fff)

* perf: use Library search results to populate container card preview [FC-0083] [TEAK] (openedx#1889)

* fix: several library unit page UX bugs (openedx#1868)

* fix: rename "Organize" tab to "Manage"

* fix: duplicate key warnings

* fix: uniform messages while adding to collection

* fix: do not allow units be added to a unit

(cherry picked from commit 0fdc460)

* perf: use Library search results to populate container card preview (openedx#1820)

* fix: use Library search results to populate container card preview

* feat: show published children when showing only published Unit content

* fix: nits

(cherry picked from commit 24e4695)

---------

Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>

* fix: manage access modal on duplicated xblock (openedx#1874)

* fix: unit pages ux bugs [FC-0083] (openedx#1884) (openedx#1916)

This PR fixes some UX bugs related to the unit pages:

* Sort for "recently modified" on unit tab does not update after adding new components to units
* Change component delete warning message

It's a backport of openedx#1884

* fix: UX issues in unit page (openedx#1913) (openedx#1923)

Fixes the following issues:

* Selection behavior
* Component selection is by header click only
* Newly created blocks within a unit should be selected on creation/save, appear selected, and have their sidebar open
* Some long text components seem to display at the default height rather than a longer height
* Within the full-page unit view, the "add to collection" overflow menu item on components does not seem to work/only opens the sidebar.
* Draft status indicator text is not vertically centered with icon
* When reordering, dragging a short component past a long component often causes a strange stutter effect.
* When dragging to reorder a component, moving quickly or scrolling often causes the drag handle to be lost / causes the block to jump somewhere else
* Reordering may not consistently support a keyboard-accessible option to change order, like in course authoring
* Tag button on component header opens the old tag side pane

(cherry picked from commit 8c3fab3)

* fix: invalidate search results when publishing all changes in library (openedx#1925) (openedx#1927)

(cherry picked from commit cdb8016)

Co-authored-by: Braden MacDonald <braden@opencraft.com>

* fix: improve focus/selected style on library authoring (openedx#1918) (openedx#1930)

Improves the focus and selected styles from the LibraryPage and UnitPage.

* fix: review/sync bugs [FC-0083] (openedx#1905) (openedx#1941)

Fixes issues related to component libraries' review/sync flow

* Inconsistent sync pane title versions
* Library content shown in preview warning only appears in review changes modal when that modal is opened from the review tab
* Some new changes only appear within library review tab on scroll at top of list
* Vertically misaligned sync icon in review changes message on course outline
* Show available updates whenever content is updated, regardless of number of updates available

* fix: Issue with read-only units in libraries & published version of units in library units picker (openedx#1940)

Fixes the issues from openedx#1633 (comment)

* In successfully added units, the "add new component" widget appears sometimes
* In the "add existing unit" modal, the preview shows draft versions of units

* fix: search modal refresh on typing (openedx#1938) (openedx#1948)

* [Teak] backport openedx#1949, openedx#1999 and openedx#2002 (openedx#2006)

* feat: select component and show sidebar on edit  (openedx#1949)

Select component that is being edited in library and show its sidebar. Also fixes issue with children component listing in library unit page

(cherry picked from commit 08ac1c0)

* fix: search text flickering (openedx#1999)

Fix flickering issue in search field.

(cherry picked from commit 6f3b7ab)

* feat: open collection or unit page on double click only (openedx#2002)

Opens collection or unit page only on double click.

(cherry picked from commit 503642b)

* fix: change InplaceTextEditor style and add optimistic update (openedx#1953) (openedx#2014)

* Optimistic update for renaming Components, Collections and Containers
* Change the InplaceTextEditor to show the new text until the onSave promise resolves
* Change the InplaceTextEditor style to: Always show the rename button

* fix: rename library publish button (openedx#2015)

* fix: do open editor of new xblock when duplicating (openedx#2017)

* feat: display editors as modals  (openedx#1838)

* fix: do open editor of new xblock when duplicating (openedx#1887)

Fixes bug where after duplicating an xblock, the editor modal of the old xblock is being open instead of the new copied xblock.

* [Teak] fix: Inconsistent publish status filter menu placement & fix: Remove never published filter from component picker (openedx#2021)

* fix: Inconsistent publish status filter menu placement (openedx#1966)

* fix: Remove never published filter from component picker (openedx#1947)

Removes the never-published filter option from the component picker and unit picker.

* fix: refresh xblock inline after accepting/rejecting library sync (openedx#2022) (openedx#2028)

Instead of reloading the entire Unit after syncing changes from the
library, just reload the xblock that was changed.

(cherry picked from commit ac5574d)

* fix: set maxHeight on TextEditor TinyMce widget [FC-0090] (openedx#2024) (openedx#2030)

Sets a max_height=500px for the TinyMCE editor when editing a Text/Html component.
This prevents the autoresize plugin from expanding the editor textarea beyond the bounds of the editor modal.

⚠️ Because the max height can only be a numeric pixel value, we can't use clever settings like vh or %, and so we're forced to limit the height of the editor to a fixed size for all screen sizes in order to address this issue.

(cherry picked from commit c5f7d0c)

* fix: upstreamInfo is not always provided (openedx#2041) (openedx#2042)

(cherry picked from commit 3fc0f27)

* fix: selection card wiggle (openedx#2047)

* fix: set unit preview readonly on sidebar (openedx#2008) (openedx#2059)

Make the unit preview on the sidebar read-only and add `Truncate` to the `InplaceTextEditor`

* fix: backport changes for html button in text component markdown editor (openedx#2065)

* fix: markdown editor issues in modal (openedx#2076)

This PR resolves rendering issues with the Markdown editor inside the modal.
The problem began after a PR [1] introduced the use of modals for the editor.
The EditorPage [2] component expects a `isMarkdownEditorEnabledForCourse` prop,
which was missing in that implementation.

[1] openedx#1838 
[2] https://github.com/openedx/frontend-app-authoring/pull/1838/files#diff-147218ef88726880178ea895988a5d3feaf2c0c4459086a8de7a4080cbe37de7R226

Backports openedx#2074

* fix: Expand all now expands subsections (openedx#2085)

* fix: files & uploads menu was truncated due to overflow-x (openedx#2071) (openedx#2077)

* fix: (backport) remove an extra editing xblock modal on unit page (openedx#2111) (openedx#2130)

* fix: (backport) enable markdown editor in libraries (openedx#2098)

* fix: enable markdown editor for problems in libraries too

This fix is also achieved on master via 5991fd3 / openedx#2068 but this is a simpler fix, not a direct backport of that refactor.

* fix: remove duplicate markdown_edited save request (openedx#2127)

Removes the unnecessary duplicate save  request of markdown_edited
value to the backend.

Part of: openedx#2099
Backports: 62589ae

---------

Co-authored-by: Muhammad Anas <88967643+Anas12091101@users.noreply.github.com>

* fix: remove icon and empty breadcrumb from libraries (openedx#2129) (openedx#2133)

* fix: (backport) text truncate issue in the search modal (openedx#2151)

* [Teak] fix: published name in unit sidebar in container picker & Issues on Inplace Editor (openedx#2140)

Backport of fix: show unit published name in sidebar on content picker [FC-0090] openedx#2100 
Backport of fix: Issue on the Inplace editor [FC-0090] openedx#2101

* feat: add `v2` `CourseAuthoringUnitSidebarSlot` (openedx#2000)

* fix: advanced-settings api should not camel-case return value (backport) (openedx#2087)

* fix: advanced-settings api should not camel-case return value (openedx#1581)

* fix: update advanced module list not working (openedx#2189)

Backend was still expecting `{'advanced_modules', {'value': ['poll', 'problem-builder', 'h5pxblock']}}` but without this change, it was receiving `{'advancedModules', ['poll', 'problem-builder', 'h5pxblock']}`

Follow up to openedx#1581

---------

Co-authored-by: Muhammad Faraz Maqsood <fmaqsood@2u.com>

* fix: clear selection on files & uploads page after deleting (backport) (openedx#2228)

* refactor: remove selected rows when deleting or adding elements

* refactor: ensure unique asset IDs when adding new ones

* refactor: remove unnecessary loading checks in mockStore function

* test: add unit tests for TableActions component

* fix: loading unit page directly from link after logging in in Teak (openedx#2246)

This is a simple version of the fix for Teak; on master it was fixed with openedx#1867

* fix: pages and resources plugins not rendered (openedx#1885)

* docs: (backport) adding comprehensive readme documentation for plugin slots (openedx#2340)

* fix: publish btn doesn't show after component edit

When we edit & save the component, publish button doesn't show up until we refresh the page manualy or open this unit by opening previous unit and coming back to this unit again.
In this commit, we are dispatching a storage event whenever we edit the component, it'll refresh the page & show the publish button as expected.

---------

Co-authored-by: Navin Karkera <navin@opencraft.com>
Co-authored-by: Jillian <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Co-authored-by: Ihor Romaniuk <ihor.romaniuk@raccoongang.com>
Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
Co-authored-by: Daniel Valenzuela <dsvalenzuela@uc.cl>
Co-authored-by: Tony Busa <70979397+tonybusa@users.noreply.github.com>
Co-authored-by: Muhammad Anas <88967643+Anas12091101@users.noreply.github.com>
Co-authored-by: Victor Navarro <vm.navarro94@gmail.com>
Co-authored-by: diana-villalvazo-wgu <diana.villalvazo@wgu.edu>
Co-authored-by: bydawen <oleksandr.buhaienko@raccoongang.com>
Co-authored-by: Arunmozhi <tecoholic@users.noreply.github.com>
Co-authored-by: José Ignacio Palma <jignaciopm13@gmail.com>
Co-authored-by: Muhammad Faraz Maqsood <fmaqsood@2u.com>
Co-authored-by: Brayan Cerón <86393372+bra-i-am@users.noreply.github.com>
Co-authored-by: Jansen Kantor <jkantor@edx.org>
Co-authored-by: Jacobo Dominguez <jacobo.dominguez@wgu.edu>
Co-authored-by: Muhammad Faraz  Maqsood <faraz.maqsood@A006-01130.local>
xitij2000 pushed a commit to open-craft/frontend-app-authoring that referenced this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants