[Site] Active section detection should respect scroll-margin-top
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- css, typescript
调研方向
先从定位在 docs 站点上渲染右侧 "Contents" 列表并跟踪 active heading 的组件开始;payload 没有指明文件,所以从 docs 的 Intro 页面开始沿目录渲染路径排查。通过在包含短 section 的页面上点击 "Desktop"、"Web" 和 "Docker" 来复现,然后检查 active heading 相对于 viewport 是如何被选中的,并将其与每个 heading 的 scroll-margin-top 进行比较。完成意味着被点击的 section 会高亮,且短 section 不再导致下一项变为 active。
由索引模型根据 Issue 内容生成。
描述
Description
Issue
On the docs Intro page, clicking an item in the right-hand "Contents" list
scrolls to that section, but the next item gets highlighted instead.
Example: clicking "Desktop" highlights "Web". Clicking "Web" highlights
"Docker". It happens where sections are short.
Currently, the active section is determined using the heading's position relative to the viewport. This can cause the sidebar to highlight a section at the wrong time, especially when headings have an offset for sticky headers.
Expected Behaviour
Active section detection should respect each heading's scroll-margin-top value so that the correct section is highlighted when the heading reaches its intended scroll position
Plugins
No response
OpenCode version
No response
Steps to reproduce
- Open any documentation page on the OpenCode website.
- Navigate through sections using the table of contents/sidebar.
- Click "Desktop" in the Contents list. .
- Observe that the active section in the sidebar may not update at the expected scroll position.
Screenshot
Operating System
macOS 26.5
Terminal
No response
- 主要语言
- TypeScript
- 星标
- 227k
- 派生
- 30.7k
- 平均合并
- 3 小时 57 分钟
- 30 天内合并 PR
- 484
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
area/cli type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#65379 · 1 条评论 ·
维护者通常 1 天内回复
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hours未关闭area/core platform/linux type/feature version/v2
难度 2/5 1-3 小时 新手友好度 75/100
anomalyco/opencode#65254 · 1 条评论 ·
维护者通常 1 天内回复
-
inference/go type/feature
难度 1/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#65148 · 1 条评论 ·
维护者通常 1 天内回复
-
area/providers type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#64845 · 1 条评论 ·
维护者通常 1 天内回复
-
area/providers platform/macos status/repro-simulated type/bug version/v2
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#64723 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
swc-project/swc-ai-issues#1001 ·
-
check:passed streams:add
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复
-
fix(table): CollapseColumn uses wrong caret icon for expandable row toggle可能已有人在做 @redhat-chai-bot 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
patternfly/patternfly-react#12727 ·
维护者通常 1 天内回复
-
CLI OAuth login fails behind an authenticating proxy: GET /api/v1/user omits Proxy-Authorization未关闭
难度 1/5 1 小时以内 新手友好度 85/100
lightdash/lightdash#33086 · 1 条评论 ·
维护者通常 1 天内回复
-
assessment bug course exercise programming
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复