Skip to content

Fix course tab responsiveness by adding slot-based overflow tabs#4590

Open
zamanafzal wants to merge 6 commits into
mainfrom
zafal/11008-fix-responsiveness-on-mobile
Open

Fix course tab responsiveness by adding slot-based overflow tabs#4590
zamanafzal wants to merge 6 commits into
mainfrom
zafal/11008-fix-responsiveness-on-mobile

Conversation

@zamanafzal
Copy link
Copy Markdown
Contributor

What are the relevant tickets?

https://github.com/mitodl/hq/issues/11008

Description (What does it do?)

  • Replaced default course tab links via org.openedx.frontend.learning.course_tab_links.v1 with ResponsiveCourseTabs.

  • Added JS-based overflow handling so tabs collapse into a More... dropdown on narrow screens.

  • Fixed hidden measurement rendering to avoid right-side blank whitespace/overflow.

  • Added scoped tab/dropdown styles under #courseTabsNavigation and kept mobile content search hidden.

  • Removed broad/experimental CSS and duplicate config noise to keep final behavior minimal and stable.

Issue:
Upstream tab overflow logic did not behave correctly with the current plugin-slot rendering shape, causing tabs to go out of bounds or not show dropdown reliably on small screens.

Screenshots (if appropriate):

https://www.loom.com/share/db5c734974c549cdb4974a662cc8c785

How can this be tested?

To test this feature locally:

Set up Tutor instance locally as described in this guide

Mount frontend-app-learning locally

Add ResponsiveCourseTabs component: Copy ResponsiveCourseTabs.jsx to the root of your local frontend-app-learning repository (alongside the .env file)

Update configuration: Update env.config.jsx with the content from learning-mfe-config.env.jsx in this PR
Update scss: Update mitxonline-styles.scss in rontend-app-learning

Copilot AI review requested due to automatic review settings May 4, 2026 11:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the default Learning MFE course tab links (via the org.openedx.frontend.learning.course_tab_links.v1 plugin slot) with a custom ResponsiveCourseTabs component that implements deterministic “overflow into a More… dropdown” behavior on narrow viewports, along with MITx Online–scoped styling to support that behavior.

Changes:

  • Add a new ResponsiveCourseTabs React component that measures tab widths and splits visible vs overflow tabs with a Paragon dropdown.
  • Wire the new component into the Learning MFE plugin slot configuration for mitxonline deployments.
  • Add MITx Online SCSS overrides to hide upstream overflow UI and style the custom overflow dropdown.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/bridge/settings/openedx/mfe/slot_config/ResponsiveCourseTabs.jsx New slot component implementing JS-based tab overflow measurement and “More…” dropdown rendering.
src/bridge/settings/openedx/mfe/slot_config/mitxonline-styles.scss Adds scoped tab-navigation CSS overrides and dropdown styling for the custom overflow menu.
src/bridge/settings/openedx/mfe/slot_config/learning-mfe-config.env.jsx Configures the Learning MFE plugin slot to replace default course tab links with ResponsiveCourseTabs for mitxonline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bridge/settings/openedx/mfe/slot_config/ResponsiveCourseTabs.jsx Outdated
Comment thread src/bridge/settings/openedx/mfe/slot_config/ResponsiveCourseTabs.jsx Outdated
Comment on lines +212 to +218
.nav > .nav-item:has(> .dropdown > #learn\\.course\\.tabs\\.navigation\\.overflow\\.menu) {
display: none !important;
}
// Fallback: hide any Tabs.jsx overflow element that is not ours
.nav > .nav-item:not(.responsive-tabs-overflow):has(> .dropdown) {
display: none !important;
}
Comment thread src/bridge/settings/openedx/mfe/slot_config/mitxonline-styles.scss Outdated
@zamanafzal zamanafzal requested a review from Ardiea May 14, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants