The course bar selects no tab in courseware
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
Start with CourseTabsNavigation and findActiveTab in frontend-base, then compare their URL matching with the Learning routes and the activeTabSlug behavior described in the issue. The issue leaves open how pages should identify their tab, so first resolve that design question with maintainers. Done when courseware pages, including course exit, consistently select the intended Course tab.
由索引模型根据 Issue 内容生成。
描述
The course bar selects no tab in courseware. On Learning's master, the Course tab is selected there.
Found while porting Learning's courseware container to frontend-base (openedx/frontend-app-learning#2195, part of openedx/frontend-app-learning#1905). Related to #332.
[!NOTE]
The details below were generated by Claude (Claude Code) and reviewed before posting.
Claude Plan
How the course bar picks the selected tab
CourseTabsNavigationmarks as active the tab thatfindActiveTab(resolvedTabs, location.pathname)returns.findActiveTab"Returns the tab whose URL pathname is the longest prefix match againstpathname, or null if none match."- The tabs and their URLs come from the
course_metadataresponse. The Course tab (CoursewareTab, typecourseware) links todefault_course_url, which by default isget_learning_mfe_home_url(course_key, url_fragment='home'): Learning's course home,…/learning/course/<course>/home. - Learning's courseware pages are at
…/learning/course/<course>,…/<sequence>and…/<sequence>/<unit>, with the same under…/learning/preview/course/<course>, and its course exit page is at…/learning/course/<course>/course-end(routes.tsxon Learning'sfrontend-basebranch). None of those addresses is under a tab's URL, sofindActiveTabreturns null and no tab is marked.
What Learning does on master
- Each page names its tab. The courseware container renders its tab page with
activeTabSlug="courseware", and so does the course exit page. isActiveTabmarks the tab whose id equals that slug. The Course tab's id is its type,courseware(xmodule/tabs.py:tab_dict.get('tab_id', getattr(self, 'tab_id', self.type))), so the Course tab is selected on every courseware page. The course home passesoutline, which the same function maps to the Course tab: "Users see one "Course" tab."
How it was seen
- 2026-11-18, on the branch that ports Learning's courseware container (openedx/frontend-app-learning#2195), against Tutor dev: on a unit's page the course bar showed no tab as selected. On the course home, the same course bar shows the Course tab as selected.
- It is the first Learning page on frontend-base whose address is under none of the tabs' URLs; until that port the courseware routes rendered a placeholder.
Questions
- Which tab, if any, should the course bar mark on a course page whose address is under no tab's URL?
- What tells the course bar which tab a page belongs to: the tabs' URLs, something the page's app declares, or the tab data?
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 13
- 平均合并
- 3 天 5 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/frontend-base 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
openedx/frontend-base#357 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
openedx/frontend-base#355 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
openedx/frontend-base#330 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
openedx/frontend-base#327 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
openedx/frontend-base#210 ·
维护者通常 1 天内回复
查看 openedx/frontend-base 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
solidjs/solid-docs#1716 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Progress indicated by console logs is off by one可能已有人在做 @marceliwac 今天认领。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
aws-samples/aws-cdk-examples#1336 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
melgarafael/DeskcommCRM#4999 · 1 条评论 ·
维护者通常 1 天内回复
-
type: bug
难度 2/5 1-3 小时 新手友好度 78/100
nrwl/nx#37955 · 1 个 reaction ·
维护者通常 2 天内回复