Skip to content

feat!: remove learning_header_actions.v1 plugin slot - #686

Open
ChrisChV wants to merge 1 commit into
openedx:masterfrom
open-craft:chris/remove-header-actions-slot-v1
Open

ChrisChV wants to merge 1 commit into
openedx:masterfrom
open-craft:chris/remove-header-actions-slot-v1

Conversation

@ChrisChV

@ChrisChV ChrisChV commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the deprecated org.openedx.frontend.layout.learning_header_actions.v1 plugin slot, following the plan in the DEPR ticket #681.

  • Removed the LearningHeaderActionsSlot/v1/ directory.
  • v2 renders HeaderNotificationsSlot and LearningHelpSlot directly as its default content
  • Removed references to .v1 from the plugin slot READMEs
  • Updated tests to reflect the new behavior

Breaking Changes

  • Plugin configurations targeting org.openedx.frontend.layout.learning_header_actions.v1 will no longer have any effect. They must be migrated to org.openedx.frontend.layout.learning_header_actions.v2.
  • The notifications tray and "Help" link are no longer hidden when showUserDropdown is false.

Supporting information

Testing instructions

  • Important: Before starting, ensure you have a Tutor environment with the Learning MFE in development mode running.
  • Clone the repo, check out this PR's branch, and run npm ci && npm run build.
  • From the Learning MFE, run npm install "../path/to/this/repo" --legacy-peer-deps.
  • Add the following to frontend-app-learning/module.config.js:
module.exports = {
  localModules: [
    {
      moduleName: '@edx/frontend-component-header',
      dir: '../frontend-component-header', // adjust this relative to your repo
    },
  ],
};
  • Add the following to frontend-app-learning/env.config.jsx. It sets showUserDropdown: false and inserts a test widget into the v2 slot:
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';

const setShowUserDropdown = (widget) => {
  widget.content = {
    ...widget.content,
    showUserDropdown: false,
  };
  return widget;
};

export default {
  pluginSlots: {
    'org.openedx.frontend.layout.header_learning.v1': {
      keepDefault: true,
      plugins: [
        {
          op: PLUGIN_OPERATIONS.Modify,
          widgetId: 'default_contents',
          fn: setShowUserDropdown,
        },
      ],
    },
    'org.openedx.frontend.layout.learning_header_actions.v2': {
      keepDefault: true,
      plugins: [
        {
          op: PLUGIN_OPERATIONS.Insert,
          widget: {
            id: 'test_v2_widget',
            type: DIRECT_PLUGIN,
            priority: 50,
            RenderWidget: () => <span>v2 test widget</span>,
          },
        },
      ],
    },
  },
};
  • Run the Learning MFE, log in and open any course, verify:
    • The user dropdown is hidden
    • The notifications tray, the "Help" link and the "v2 test widget" are shown
  • In env.config.jsx, change showUserDropdown to true and reload. Confirm the notifications tray, the "Help" link, the "v2 test widget" and the user dropdown are all shown.

BREAKING CHANGE: The `org.openedx.frontend.layout.learning_header_actions.v1`
slot and the `LearningHeaderActionsSlotV1` export were removed. Plugin configs
must target `.v2`.

See openedx#681
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 3, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @ChrisChV!

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

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.47%. Comparing base (922e367) to head (5ea1fb5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #686      +/-   ##
==========================================
+ Coverage   74.43%   74.47%   +0.04%     
==========================================
  Files          61       60       -1     
  Lines         528      521       -7     
  Branches      111      109       -2     
==========================================
- Hits          393      388       -5     
+ Misses        132      130       -2     
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 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 Ready for Review in Contributions Nov 4, 2026

@tecoholic tecoholic left a comment

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.

@ChrisChV 👍

  • I tested this: Tested the the slot operates as described.
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

@ChrisChV
ChrisChV requested a review from arbrandes November 5, 2026 19:11
@ChrisChV

ChrisChV commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@arbrandes could you review this?

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: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants