Skip to content

Conversation

@rpenido
Copy link
Contributor

@rpenido rpenido commented Jan 19, 2026

Description

In this PR, we add support to read the pluginProps using the PLUGIN_OPERATIONS.Wrap operation. This gives us more flexibility while using plugins, allowing the wrapper component to receive context from the PluginSlot.

There is a practical use here: openedx/frontend-plugin-aspects#115

Additional Information

Testing Instructions


Private ref: FAL-4299

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

Thanks for the pull request, @rpenido!

This repository is currently maintained by @openedx/committers-frontend.

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.

1 similar comment
@openedx-webhooks
Copy link

Thanks for the pull request, @rpenido!

This repository is currently maintained by @openedx/committers-frontend.

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.

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.91%. Comparing base (b81f409) to head (97f0e24).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files          10       10           
  Lines         245      245           
  Branches       75       72    -3     
=======================================
  Hits          235      235           
  Misses          9        9           
  Partials        1        1           

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

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Jan 20, 2026
@rpenido rpenido force-pushed the rpenido/pass-pluginProps-to-wrapper branch 4 times, most recently from 674cdbc to 797e0df Compare January 21, 2026 22:13
Copy link
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.

This looks eminently reasonable, but I'm concerned about backward compatibility. Do you mind adding unit tests that verify that not having any pluginProps specified both in the slot itself and in the user-provided wrapper won't break anything?

*
* @param {Function} renderComponent - Function that returns JSX (i.e. React Component)
* @param {Array} wrappers - Array of components that each use a "component" prop to render the wrapped contents
* @params {object} pluginProps - Props defined in the PluginSlot
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this is a typo:

Suggested change
* @params {object} pluginProps - Props defined in the PluginSlot
* @param {object} pluginProps - Props defined in the PluginSlot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Fixed here: 97f0e24

README.rst Outdated
Comment on lines 276 to 278
pluginProps: {
prop1: 'prop1',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this works. The only way to pass pluginProps is via the slot instance itself, not via env.config.jsx.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ops! My bad. Fixed here: 97f0e24

Copy link
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.

Ok, I think this is good. Thank you for your patience!

@arbrandes arbrandes merged commit 5561b4c into openedx:master Jan 27, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in Contributions Jan 27, 2026
@openedx-semantic-release-bot

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rpenido
Copy link
Contributor Author

rpenido commented Jan 27, 2026

Thanks for the review and merge @arbrandes!

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 released

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants