Skip to content

feat: register help button in the header#191

Open
brian-smith-tcril wants to merge 1 commit intoopenedx:mainfrom
brian-smith-tcril:help-button
Open

feat: register help button in the header#191
brian-smith-tcril wants to merge 1 commit intoopenedx:mainfrom
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. Registers a help button in the header for instructor-dashboard via the new helpButtonSlotOperation helper from frontend-base.

The URL comes from getAppConfig(instructorDashboardAppId).SUPPORT_URL at render time. In production it's populated via the backend's frontend site config API:

  • MFE_CONFIG_OVERRIDES.instructor-dashboard.SUPPORT_URL if set, else
  • the help-tokens legacy fallback (resolved per-app on the backend), else
  • commonAppConfig.SUPPORT_URL as a final fallback.

If none are set, the button doesn't render — matching the existing learner-dashboard behavior.

This PR depends on openedx/frontend-base#251 — do not merge before that.

Test plan

  • nvm use && npm run test — full suite green
  • In template-site dev, set commonAppConfig.SUPPORT_URL and verify the Help link appears in the header on instructor-dashboard routes
  • Set a per-app override for instructor-dashboard and verify it takes precedence over commonAppConfig
  • Verify the link disappears when both are empty (and help-tokens fallback isn't configured in your local backend)

🤖 Generated with Claude Code

Calls frontend-base's helpButtonSlotOperation to surface a Help link
in the header for instructor-dashboard routes, gated on the
instructor-dashboard role. The URL comes from getAppConfig().SUPPORT_URL,
which the backend resolves via MFE_CONFIG / MFE_CONFIG_OVERRIDES or the
help-tokens legacy fallback.

Refs openedx/frontend-base#245

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@brian-smith-tcril brian-smith-tcril marked this pull request as ready for review April 29, 2026 16:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.96%. Comparing base (8532409) to head (eb768b6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/slots.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   89.89%   89.96%   +0.06%     
==========================================
  Files         139      139              
  Lines        2277     2291      +14     
  Branches      459      495      +36     
==========================================
+ Hits         2047     2061      +14     
+ Misses        224      222       -2     
- Partials        6        8       +2     

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

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.

👍🏼

@arbrandes arbrandes linked an issue Apr 29, 2026 that may be closed by this pull request
@diana-villalvazo-wgu
Copy link
Copy Markdown
Contributor

Should we ignore slots.tsx on codecov? 🤔

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.

Help button in the header

3 participants