Skip to content

feat: remove waffle flags for managing course outline sidebar #1713

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ihor-romaniuk
Copy link
Contributor

@ihor-romaniuk ihor-romaniuk commented May 23, 2025

DEPR: openedx/public-engineering#316 (comment)

Description

This PR removes support for the deprecated waffle flags:

  • courseware.enable_navigation_sidebar
  • courseware.always_open_auxiliary_sidebar

These flags have been replaced by PluginSlots introduced in PR #1543, available starting from the Teak release.

The default behavior is now:

  • Navigation sidebar is shown by default
  • Auxiliary sidebar is closed by default

All customization should now be handled via the Frontend Plugin Framework using PluginSlot.

This change simplifies the sidebar logic and reduces technical debt.

Testing Instructions

  1. Open a course in courseware view.
  2. Confirm the following:
    • Navigation sidebar is visible.
    • Auxiliary sidebar is hidden unless triggered explicitly.
  3. Ensure the behavior remains the same regardless of any waffle flag presence or value.
  4. Validate that plugin-based sidebar overrides via PluginSlot still function correctly.

Changelog

  • Removed legacy waffle flags: courseware.enable_navigation_sidebar, courseware.always_open_auxiliary_sidebar.
  • Unified sidebar behavior under plugin-based architecture.

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

openedx-webhooks commented May 23, 2025

Thanks for the pull request, @ihor-romaniuk!

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

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 May 23, 2025
@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch from f7a40b1 to 2fb7ca8 Compare May 23, 2025 10:14
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.33%. Comparing base (d1dede5) to head (ead604f).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1713      +/-   ##
==========================================
- Coverage   90.45%   90.33%   -0.12%     
==========================================
  Files         344      344              
  Lines        5802     5793       -9     
  Branches     1395     1394       -1     
==========================================
- Hits         5248     5233      -15     
- Misses        535      541       +6     
  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.

@ihor-romaniuk ihor-romaniuk added the create-sandbox open-craft-grove should create a sandbox environment from this PR label May 27, 2025
@ihor-romaniuk ihor-romaniuk marked this pull request as ready for review May 27, 2025 13:18
@brian-smith-tcril
Copy link
Contributor

I haven't taken a full look at this yet, but my first impressions are that it is looking pretty good.

Would you be able to break off the part adding the SequenceNavigationSlot into a separate PR? I'd be happy to review/approve/merge that ASAP!

@ihor-romaniuk
Copy link
Contributor Author

@brian-smith-tcril I prepared new pull request with moving the SequenceNavigation to a plugin slot
#1716

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch 2 times, most recently from ac4b03d to c18958a Compare May 27, 2025 15:55
Copy link
Contributor

@robrap robrap left a comment

Choose a reason for hiding this comment

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

Unless I’m mistaken, this is a removal PR for a DEPR that hasn’t made it to the Breaking Changes Unblocked state. I think the DEPR ticket may need a coordinator from the DEPR WG assigned to help ensure the changes move forward without hurting deployments, especially early deployers. Thank you.

I’m temporarily marking with Request Changes to ensure this doesn’t merge yet.

@feanil
Copy link
Contributor

feanil commented May 27, 2025

I've updated the DEPR and am seeking feedback on timing in https://discuss.openedx.org/t/deprecation-ability-to-modify-learning-mfe-sidebar-behavior-with-waffle-flags/15119/4?u=feanil

Given that the replacement has existed for some time and there were no objections, I'm proposing we land this by next week, please chime in on the DEPR ticket or the discuss thread about concerns with that timing.

@ihor-romaniuk thanks for the PR, sorry about the DEPR process churn, we're in the middle of changing that process so there is a bit of adapting we have to do.

@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ihor-romaniuk ihor-romaniuk added create-sandbox open-craft-grove should create a sandbox environment from this PR and removed create-sandbox open-craft-grove should create a sandbox environment from this PR labels May 28, 2025
@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@@ -170,7 +169,7 @@ const Sequence = ({
/>
<CourseOutlineSidebarSlot />
<div className="sequence w-100">
{!isEnabledOutlineSidebar && (
{!getConfig().ENABLE_SEQUENCE_NAVIGATION && (
Copy link
Contributor

Choose a reason for hiding this comment

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

  • It seems like ENABLE_SEQUENCE_NAVIGATION is new, was a specific decision made to use getConfig() for this as opposed to relying on FPF slots?
  • The logic here feels backwards, as it stands it seems SequenceNavigation is rendered when getConfig().ENABLE_SEQUENCE_NAVIGATION is falsy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. You are right. The ENABLE_SEQUENCE_NAVIGATION config is new, and its main purpose is to allow this functionality to remain disabled by default, since as far as I know, we cannot keep a plugin slot disabled by default.
  2. That was my mistake, and it has been fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The goal here would not be to enable/disable the slot - the slot should always be rendered. The goal is to render nothing in the slot by default.

The way I would handle this using only FPF slots would be to:

  • Keep the SequenceNavigation in the codebase, but no longer have it as the default content of the SequenceNavigationSlot.
  • Update the SequenceNavigationSlot README to include an example env.config.jsx showing how to use the SequenceNavigation component in the SequenceNavigationSlot

Copy link
Contributor Author

@ihor-romaniuk ihor-romaniuk Jun 6, 2025

Choose a reason for hiding this comment

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

I have updated pull request with:

  • set default (empty) state to SequenceNavigationSlot
  • add an example of usage SequenceNavigationSlot with a default SequenceNavigation component
  • update tests (code coverage is a bit lower since we removed the SequenceNavigation component from the code and I don't think it needs to be tested separately since it's an option we don't use by default)

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch from a8c907a to 1a706f5 Compare June 4, 2025 19:38
@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch from 1a706f5 to 9d06665 Compare June 4, 2025 19:39
@itsjeyd itsjeyd added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Jun 12, 2025
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch from 1121eed to 2e8e6dc Compare June 13, 2025 12:58
@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@brian-smith-tcril
Copy link
Contributor

@ihor-romaniuk I discussed the versioning question with @arbrandes and some other Axim engineers and we decided that this does not need a version bump

From the versioning docs:

Note: a given slot's default content is explicitly not part of its contract. Changes to it do not result in a version bump.

This is a bit of an odd situation because the versioning docs also say

For the purposes of versioning, a given slot's API contract is comprised of: [...]

  • The type (but not implementation!) of the content it is expected to wrap

This led us to discuss needing a process for communicating default content changes outside of slot versioning. I have created an issue on the FPF repo to discuss the best way to turn this into an ADR.

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ihor-romaniuk
Copy link
Contributor Author

@brian-smith-tcril Should we revert our changes regarding bumping plugin slot version or we should wait for result of the discussion "Docs: Create ADR for default content versioning"

@brian-smith-tcril
Copy link
Contributor

@brian-smith-tcril Should we revert our changes regarding bumping plugin slot version or we should wait for result of the discussion "Docs: Create ADR for default content versioning"

@ihor-romaniuk for this PR just reverting the version bump should be fine. I do want to figure out a default content versioning plan but that shouldn't block this work.

@ihor-romaniuk
Copy link
Contributor Author

@brian-smith-tcril I’ve reverted the recent changes related to the plugin slot version bump. The PR is now ready for review.

@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ihor-romaniuk ihor-romaniuk added create-sandbox open-craft-grove should create a sandbox environment from this PR and removed create-sandbox open-craft-grove should create a sandbox environment from this PR labels Jun 26, 2025
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@brian-smith-tcril
Copy link
Contributor

@ihor-romaniuk it looks like code coverage for this change is quite low. I see that some tests have been removed. Could you look into updating some of those tests instead of removing them?

@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch 5 times, most recently from 06c4cb1 to 60ed4d3 Compare June 27, 2025 16:33
@ihor-romaniuk ihor-romaniuk force-pushed the romaniuk/remove-waffle-flags-for-managing-outline-sidebar branch from 60ed4d3 to ead604f Compare June 27, 2025 16:46
@ihor-romaniuk
Copy link
Contributor Author

@ihor-romaniuk it looks like code coverage for this change is quite low. I see that some tests have been removed. Could you look into updating some of those tests instead of removing them?

@brian-smith-tcril I’ve updated the tests and excluded unused methods from the Codecov coverage report, as these handlers are passed solely to support the props required by the plugin slot, though they are not used by default.

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
Status: In Eng Review
Development

Successfully merging this pull request may close these issues.

7 participants