Skip to content

feat: Created the plugin slot for UpgradeToCompleteAlert#1909

Merged
arbrandes merged 1 commit into
openedx:masterfrom
edx:SUBS-173-pr47
May 8, 2026
Merged

feat: Created the plugin slot for UpgradeToCompleteAlert#1909
arbrandes merged 1 commit into
openedx:masterfrom
edx:SUBS-173-pr47

Conversation

@mshet-sonata-pixel
Copy link
Copy Markdown
Contributor

@mshet-sonata-pixel mshet-sonata-pixel commented May 4, 2026

Creating a PluginSlot UpgradeToCompleteAlert at the location of the - https://github.com/openedx/frontend-app-learning/blob/master/src/course-home/suggested-schedule-messaging/UpgradeToCompleteAlert.jsx , The PluginSlot should render nothing by default. We will be injecting the Alert as a plugin instead.

This will need to be reviewed by 2U owning teams as well as the open source community. It should get support from open source.

The below is the Screeshot-
image

@MaxFrank13
Copy link
Copy Markdown
Member

@michaelroytman do you have permissions to run the workflows? I do not.

Thanks for the review!

@arbrandes arbrandes self-requested a review May 7, 2026 21:45
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (7168374) to head (8e952f9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1909   +/-   ##
=======================================
  Coverage   91.29%   91.30%           
=======================================
  Files         343      344    +1     
  Lines        5770     5774    +4     
  Branches     1388     1351   -37     
=======================================
+ Hits         5268     5272    +4     
  Misses        483      483           
  Partials       19       19           

☔ 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.

Copy link
Copy Markdown
Contributor

@arbrandes arbrandes 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 this! Took a first pass, asked for a couple of changes.

}: BannerDatesUpgradeSlotProps) => (
<PluginSlot
id="org.openedx.frontend.learning.banner_dates_upgrade.v1"
idAliases={['dates_upgrade_banner_slot']}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aliases exist to support a deprecation window for slots that are being renamed. Since this is a new slot, it shouldn't have an alias.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed @arbrandes Thanks!


const config = {
pluginSlots: {
dates_upgrade_banner_slot: {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's use the full id, here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed Thanks!

{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'org.openedx.frontend.learning.banner_dates_upgrade.v1',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is the widget id: it's arbitrary, and ideally it'll be different from the slot id where it's used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed Thanks!

@arbrandes arbrandes self-requested a review May 8, 2026 09:44
Copy link
Copy Markdown
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Thank you for addressing my comments.

Now we have to fix the coverage regression. There are two ways to do that: either you remove the default content in the slot (not just from the slot, but from the codebase), or you restore some of the removed tests (such as the deleted analytics test (DatesTab.test.jsx:257-281).

@arbrandes arbrandes self-requested a review May 8, 2026 12:00
@arbrandes arbrandes merged commit 89d511b into openedx:master May 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants