Skip to content

feat: Add plugins slots for sidebars and application #1752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2025

Conversation

xitij2000
Copy link
Contributor

@xitij2000 xitij2000 commented Mar 20, 2025

Description

This PR adds three slots to the authoring app:

  • A slot for the sidebar displayed next to the unit editor page
  • A slot for the sidebar displayed next to the course outline page

Supporting information

NA

Testing instructions

NA

Other information

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

openedx-webhooks commented Mar 20, 2025

Thanks for the pull request, @xitij2000!

This repository is currently maintained by @openedx/2u-tnl.

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.


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 Mar 20, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Mar 24, 2025
@xitij2000 xitij2000 force-pushed the kshitij/aspects-plugin branch 2 times, most recently from 266e45a to 4b483c5 Compare March 31, 2025 10:44
@farhaanbukhsh
Copy link
Member

@xitij2000 please rebase your PR on master :)

@xitij2000 xitij2000 force-pushed the kshitij/aspects-plugin branch 2 times, most recently from 4f28c86 to 19d60fa Compare April 9, 2025 08:40
@xitij2000 xitij2000 changed the title feat: Add plugins slots for sidebars, outline actions and application feat: Add plugins slots for sidebars and application Apr 9, 2025
@xitij2000
Copy link
Contributor Author

@farhaanbukhsh Done.

Note: currently the plugin slots are not extracted into the plugin-slots folder since I want to get feedback abotu the location names etc first.

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.53%. Comparing base (fe36e65) to head (b9a9210).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1752      +/-   ##
==========================================
+ Coverage   93.50%   93.53%   +0.02%     
==========================================
  Files        1128     1132       +4     
  Lines       22925    23043     +118     
  Branches     4953     4978      +25     
==========================================
+ Hits        21436    21553     +117     
- Misses       1413     1414       +1     
  Partials       76       76              

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

@farhaanbukhsh
Copy link
Member

@xitij2000 I think the names LGTM and we can extract this to the plugin slot :)

@brian-smith-tcril Do you think the slot names are okay here?

@brian-smith-tcril
Copy link
Contributor

In the future we'll want to have names that follow the format described here. For now these names seem mostly reasonable, but I have a few thoughts:

  • course_outline_sidebar
  • course_unit_sidebar
    • I think for now course_unit_sidebar_slot would be reasonable.

As for authoring_app_wrapper, I'm curious about the decision to put it so high up in the component hierarchy. Could you elaborate on why it needs to wrap everything but the AppProvider?

@xitij2000 xitij2000 force-pushed the kshitij/aspects-plugin branch 3 times, most recently from 2f055db to bebfabd Compare April 9, 2025 11:46
@xitij2000 xitij2000 marked this pull request as ready for review April 9, 2025 11:46
@xitij2000
Copy link
Contributor Author

@brian-smith-tcril Thanks for the feedback!

For consistency, should I also rename course_unit_sidebar_slot to course_authoring_unit_sidebar_slot?

I've put the reasoning (and alternatives) for the authoring_app_wrapper in the PR description under "Other information"

@brian-smith-tcril
Copy link
Contributor

For consistency, should I also rename course_unit_sidebar_slot to course_authoring_unit_sidebar_slot?

That sounds great!

I've put the reasoning (and alternatives) for the authoring_app_wrapper in the PR description under "Other information"

I think the full MFE wrapper slot pattern should be a bigger discussion. Would you mind splitting this PR up so we can land the outline sidebar and unit sidebar slots first? I don't want the discussion to block the uncontroversial additions.

@xitij2000
Copy link
Contributor Author

I've put the reasoning (and alternatives) for the authoring_app_wrapper in the PR description under "Other information"

I think the full MFE wrapper slot pattern should be a bigger discussion. Would you mind splitting this PR up so we can land the outline sidebar and unit sidebar slots first? I don't want the discussion to block the uncontroversial additions.

Sure, I will do that.

@xitij2000 xitij2000 force-pushed the kshitij/aspects-plugin branch 3 times, most recently from 6db68df to 38caa60 Compare April 9, 2025 17:36
Add slots for the sidebar on the course outline page and the unit page.
@xitij2000 xitij2000 force-pushed the kshitij/aspects-plugin branch from 38caa60 to 633fb23 Compare April 9, 2025 17:42
@xitij2000
Copy link
Contributor Author

I've created a separate PR for the full app slot: #1799

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 good! I left a couple little comments about names and docs. Once those are addressed this should be good to go!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the screenshot names might have gotten mixed up. This is showing a border around the entire page.

@brian-smith-tcril
Copy link
Contributor

@xitij2000 it looks like this is failing lint, could you run npm run lint:fix?

@xitij2000
Copy link
Contributor Author

@xitij2000 it looks like this is failing lint, could you run npm run lint:fix?

Odd, I did run that before committing, but it seem it couldn't fix this. I've fixed it manually and pushed.

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.

Super close to ready to land. Just the one issue with the image.

@brian-smith-tcril brian-smith-tcril merged commit 341a03c into master Apr 11, 2025
7 checks passed
@brian-smith-tcril brian-smith-tcril deleted the kshitij/aspects-plugin branch April 11, 2025 11:19
@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in Contributions Apr 11, 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
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants