Skip to content

refactor: use frontend-base helpButtonSlotOperation for the help link#840

Merged
brian-smith-tcril merged 1 commit into
openedx:frontend-basefrom
brian-smith-tcril:help-button
Apr 29, 2026
Merged

refactor: use frontend-base helpButtonSlotOperation for the help link#840
brian-smith-tcril merged 1 commit into
openedx:frontend-basefrom
brian-smith-tcril:help-button

Conversation

@brian-smith-tcril
Copy link
Copy Markdown
Contributor

@brian-smith-tcril brian-smith-tcril commented Apr 28, 2026

Summary

Companion PR to openedx/frontend-base#251. Switches learner-dashboard's existing per-app SupportLinkMenuItem widget to the new shared helpButtonSlotOperation helper. Functionally equivalent — same Help link, same SUPPORT_URL semantics, same desktop-only scope.

Also drops SUPPORT_URL: '' from src/app.ts. lodash.merge in getAppConfig treats '' as a real value that shadows commonAppConfig.SUPPORT_URL, breaking the documented precedence fallback. Removing it lets commonAppConfig flow through naturally when no per-app override is set; runtime config still flows in via mergeAppConfig when present. (Other empty-string keys in that block — ECOMMERCE_BASE_URL, ORDER_HISTORY_URL — likely have the same latent issue but are out of scope here.)

The previously per-app SupportLinkMenuItem.jsx and the help message are deleted; the rendering now lives in frontend-base.

This PR targets the frontend-base branch (the in-progress frontend-base migration branch). It depends on openedx/frontend-base#251 — do not merge before that.

Test plan

  • nvm use && npm run test — full suite green (existing header tests still pass; SupportLinkMenuItem tests removed)
  • In template-site dev, set commonAppConfig.SUPPORT_URL and verify Help renders on a learner-dashboard route, links to the URL
  • Set per-app override for learner-dashboard and verify it takes precedence
  • Verify the link disappears when both are empty

🤖 Generated with Claude Code

Replaces the per-app SupportLinkMenuItem widget with the centralized
helper from frontend-base. The shared HelpButton component lives in
frontend-base now (see openedx/frontend-base#245), and apps register
it with one helper call.

Also drops SUPPORT_URL: '' from app.ts. lodash.merge in getAppConfig
treats the empty string as a real value that shadows
commonAppConfig.SUPPORT_URL, breaking the documented precedence
fallback chain. With the field absent, runtime config still flows in
via mergeAppConfig, and commonAppConfig flows through getAppConfig's
merge when no per-app override is set.

The unused help message and SupportLinkMenuItem component are
removed.

Refs openedx/frontend-base#245

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (frontend-base@56b971c). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             frontend-base     #840   +/-   ##
================================================
  Coverage                 ?   91.00%           
================================================
  Files                    ?      151           
  Lines                    ?     1279           
  Branches                 ?      270           
================================================
  Hits                     ?     1164           
  Misses                   ?      110           
  Partials                 ?        5           

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

@brian-smith-tcril brian-smith-tcril marked this pull request as ready for review April 29, 2026 16:13
Copy link
Copy Markdown
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

👍🏼

@brian-smith-tcril brian-smith-tcril merged commit 1361d1e into openedx:frontend-base Apr 29, 2026
6 checks passed
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.16 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Help button in the header

3 participants