Learning header Help link renders href="null" when SUPPORT_URL is unset
还没有人认领这个 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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/frontend-component-header 的其他 Issue
-
[DEPR]: Learning Header Actions Slot V1可能重新可做 @ChrisChV 于 68 天前认领,目前没有进行中的 PR。 未关闭depr
openedx/frontend-component-header#681 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 68/100
openedx/frontend-component-header#673 · 5 条评论 ·
-
[a11y]: The tab and arrow keys are not trapped in the header dropdown once activated.可能重新可做 @peterkulko 于 219 天前认领,目前没有进行中的 PR。 未关闭a11y
openedx/frontend-component-header#664 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 30/100
openedx/frontend-component-header#639 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 52/100
openedx/frontend-component-header#579 · 1 个 reaction ·
查看 openedx/frontend-component-header 的全部 Issue
相似的 Issue
-
44-x-y bug :beetle:
难度 1/5 1 小时以内 新手友好度 82/100
electron/electron#55528 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
react/react-native#59699 ·
维护者通常 2 天内回复
-
status: needs triage
难度 2/5 1-3 小时 新手友好度 72/100
mastra-ai/mastra#29053 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement triage
难度 2/5 1-3 小时 新手友好度 70/100
fjaeckel/seriesoftubes#230 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复