Skip to content

Conversation

@Anas12091101
Copy link
Contributor

@Anas12091101 Anas12091101 commented Mar 10, 2025

Description

This PR replaces StudioFooter with StudioFooterSlot, allowing the customization of footer in the authoring MFE. StudioFooterSlot is added to frontend-slot-footer in this PR: openedx-unsupported/frontend-slot-footer#60

Useful information to include:

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

Supporting information

Slack Thread: https://openedx.slack.com/archives/C04BM6YC7A6/p1741354164744729?thread_ts=1741187643.034179&cid=C04BM6YC7A6
Issue: https://github.com/mitodl/hq/issues/5689

Testing instructions

  • Checkout to this branch and run npm ci.
  • Verify that the default studio footer loads perfectly without any issues.
  • Create env.config.jsx file and add the following:
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';

const config = {
  pluginSlots: {
    studio_footer_slot: {
      plugins: [
        {
          // Hide the default footer
          op: PLUGIN_OPERATIONS.Hide,
          widgetId: 'default_contents',
        },
        {
          // Insert a custom footer
          op: PLUGIN_OPERATIONS.Insert,
          widget: {
            id: 'custom_footer',
            type: DIRECT_PLUGIN,
            RenderWidget: () => (
              <h1 style={{textAlign: 'center'}}>🦶</h1>
            ),
          },
        },
      ]
    }
  },
}

export default config;

Open the MFE in your browser and verify that the studio footer is replaced with 🦶 on all pages where it is present.

Other information

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

@openedx-webhooks
Copy link

openedx-webhooks commented Mar 10, 2025

Thanks for the pull request, @Anas12091101!

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.

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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 10, 2025
@Anas12091101 Anas12091101 marked this pull request as draft March 10, 2025 18:41
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Mar 10, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Mar 11, 2025
@mphilbrick211 mphilbrick211 moved this from In Eng Review to Waiting on Author in Contributions Mar 11, 2025
Copy link
Contributor

@asadali145 asadali145 left a comment

Choose a reason for hiding this comment

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

looks good. Will approve after the final updates.


const config = {
pluginSlots: {
footer_slot: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
footer_slot: {
studio_footer_slot: {

@@ -0,0 +1,50 @@
# Footer Slot
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Footer Slot
# Studio Footer Slot

@Anas12091101 Anas12091101 force-pushed the anas/add-studio-footer-slot branch 2 times, most recently from 4df84a7 to f43ab9c Compare April 4, 2025 08:01
@codecov
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.53%. Comparing base (15fcb55) to head (0222e61).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1729      +/-   ##
==========================================
+ Coverage   93.46%   93.53%   +0.07%     
==========================================
  Files        1124     1132       +8     
  Lines       22746    23043     +297     
  Branches     4823     4978     +155     
==========================================
+ Hits        21259    21553     +294     
+ Misses       1419     1414       -5     
- Partials       68       76       +8     

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

@Anas12091101 Anas12091101 marked this pull request as ready for review April 4, 2025 08:26
@Anas12091101
Copy link
Contributor Author

@brian-smith-tcril could you please review this PR?

@Anas12091101 Anas12091101 force-pushed the anas/add-studio-footer-slot branch from dd4361a to 4fd0101 Compare April 4, 2025 13:35
@Anas12091101
Copy link
Contributor Author

Hi @brian-smith-tcril, I wanted to check in on this PR as we’re hoping to get it merged soon. Would you be able to take a look when possible? Happy to address any concerns.

"@dnd-kit/utilities": "^3.2.2",
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.3",
"@edx/browserslist-config": "1.2.0",
"@edx/frontend-component-footer": "^14.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to keep this dependency in here. frontend-slot-footer has an unversioned peer dependency on frontend-component-footer, so keeping a versioned dependency in here is helpful.

@brian-smith-tcril brian-smith-tcril merged commit 01365d0 into openedx:master Apr 11, 2025
7 checks passed
@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

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants