Header: the narrow-layout menu never shows primaryLinks (separate mobileMenuLinks slot that no app fills)

未关闭
#322 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
react, typescript
领域
frontend

调研方向

The narrow menu renders the mobileMenuLinks slot in mobile/MobileNavLinks.tsx, and the wide layout renders primaryLinks in desktop/PrimaryNavLinks.tsx; the header wiring is in shell/header/app.tsx. Read how both slots are composed there and in shell/dev/devHeader/app.tsx to see which one the narrow menu is missing. Done means that primaryLinks entries appear in the mobile menu at 375 px, or that the maintainers pick the documented alternative and update the first-party apps. The choice between the two options needs a maintainer decision first.

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

描述

bug

At narrow widths (below the header's 768 px breakpoint) the shell header drops every app's primary navigation links. The wide layout renders the org.openedx.frontend.slot.header.primaryLinks.v1 slot (desktop/PrimaryNavLinks.tsx). The narrow menu renders a different slot, org.openedx.frontend.slot.header.mobileMenuLinks.v1 (mobile/MobileNavLinks.tsx). No app fills that slot: searching the openedx org finds it only in frontend-base itself, where shell/header/app.tsx prepends the language menu. frontend-base's own dev header (shell/dev/devHeader/app.tsx) fills only primaryLinks.

Example (Tutor main, signed out, catalog home, 2026-10-16):

  • 1280 px: the header shows Explore courses → /catalog/courses, from frontend-app-catalog's headerLinkExploreCourses widget, plus Sign Up and Login.
  • 375 px: the toggle opens a menu containing only the language selector. "Explore courses" isn't anywhere in the header. The same applies to the catalog's signed-in links (Courses / Programs / Discover) and to learner-dashboard's primary links.
  • Manually confirmed on a Pixel 10 against the master sandbox.

Impact: on a phone, the main navigation each app registers is unreachable from the header. For a signed-out visitor on the landing page, the full course catalog listing can only be reached by URL.

Expected: the narrow menu shows the same primary links as the wide layout. Options: render primaryLinks inside the mobile menu (or make mobileMenuLinks include it by default), or document that apps must register their links in both slots and update the first-party apps.

Environment: frontend-base main (header code as of 2026-09-22, #316), Tutor main (overhangio/openedx-mfe:22.1.0-main). First seen 2026-09-23 with an empty menu, before #316 added the language item. Found by the Open edX end-to-end test suite (BTR TC-00061).

主要语言
TypeScript
星标
4
派生
13
平均合并
3 天 5 小时
30 天内合并 PR
4

环境准备

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

从这里开始

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

openedx/frontend-base 的其他 Issue

查看 openedx/frontend-base 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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