Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Learning header Help link renders href="null" when SUPPORT_URL is unset

未关闭 适合新手
#685 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, react
领域
frontend

调研方向

从 src/learning-header/LearningHeaderHelpLink.jsx 开始,这里的 Help 链接 href 是在模板字符串中由 getConfig().SUPPORT_URL 拼接而成的。检查未设置 SUPPORT_URL 时 getConfig() 返回什么,然后找到学习头部(learning header)在哪里渲染这个组件。完成的标准是:没有 SUPPORT_URL 时完全不渲染 Help 链接,有有效 URL 时仍然渲染。查找该组件已有的测试以便扩展,并确认 frontend-base 外壳的 Help 小组件模式是否适用。

由索引模型根据 Issue 内容生成。

描述

The learning header's Help link renders as <a class="text-gray-700" href="null"> when the MFE config has no SUPPORT_URL. That's the default: neither the platform nor Tutor sets it for the learning MFE. Clicking it navigates to a relative null path.

Cause: src/learning-header/LearningHeaderHelpLink.jsx builds the href with a template literal:

<a className="text-gray-700" href={`${getConfig().SUPPORT_URL}`}>{intl.formatMessage(messages.help)}</a>

so an unset SUPPORT_URL (null) becomes the string "null", and the link always renders.

Expected: don't render the Help link when SUPPORT_URL is empty, as the frontend-base shell's Help widget does. #276 (2022, closed unmerged) proposed that.

Environment: Tutor main and verawood, learning MFE course home and unit pages, 2026-09-23; component unchanged on master since #545 (2024-10). This is the "Help link does not redirect" half of openedx/wg-build-test-release#579 (TC-00021). Found by the Open edX end-to-end test suite.

主要语言
JavaScript
星标
10
派生
194
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openedx/frontend-component-header 的其他 Issue

查看 openedx/frontend-component-header 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。