Repository navigation
我的关注:左栏分组收成页头右上角的下拉(#367 改版) - #737
Merged
Merged
Conversation
- 200 宽常驻分组栏 → 页头一枚「全部关注 ▾」下拉,内容区一行顶到右缘 - 弹层里保留三态:加载中 / 分组没拉出来(可重试)/ 还没有分组,「全部 关注(N)」和分组之间仍有一道分界 - 收起那一格写当前组名(followPaneTitle 复用);触发器 Label 固定「选择 关注分组」让读屏和测试找得到人 - SelectBase 直接绑 f.tab 本体;Changed() 放在 Popup 之后查—— applyInputs 跑的是弹层 Item 的 choose(),先查会永远漏掉那一选 - chevronSVG 解析一次缓存:每帧 MustParseSVG 实测 70 分配 / 5.4KB,会顶爆 关注页的帧预算 - 网格列数断言 3→4:左栏收掉之后同窗口网格宽 948→1148,过 1024 那一档 - E2E 新族:真窗口上按 id 发 press 点开侧栏与下拉、Esc 收弹层;E2E 跑前 先种假登录态(假 SESSDATA 只让侧栏显示那一项,B 站那拉真发真败)
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
PudMusic UI 截图截图测试已通过。
截图来自项目现有的 MyGo UI 测试渲染器,使用本地 fixture,不启动真实登录态。 |
| }) | ||
|
|
||
| sel.Popup(func(panel ui.Element) { | ||
| popupPanel(t, panel.Grow(1).MaxWidth(280).Padding(space.Px4)).Children(func() { |
There was a problem hiding this comment.
Suggestion: The popup renders every group without a height limit or scrolling, so a long group list or short window can leave later groups off-screen and unreachable.
Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Css layout issue
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** internal/ui/follow.go
**Line:** 554:554
**Comment:**
*Css Layout Issue: The popup renders every group without a height limit or scrolling, so a long group list or short window can leave later groups off-screen and unreachable.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
|
- E2E 两处把「全部关注」当「弹层开了/收了」的判据:它同时是触发器收起 时写的字(停在全部关注那一格时),弹层收掉后它还在树上——gone 名单里 有它这一条永远等不到。只能拿三态独有的三句。 - follow_test 的「页头画了我的关注/总数」判据是空的:侧栏里也有 「我的关注」,Find/showsText 找到侧栏那一枚也算过。改成数「我的关注」 有几枚(≥2 才说明页头画了)+ 总数「3」量在侧栏右缘之外。 - 过时时注释:网格登记的注释还写着「在分组栏之后登记」,分组栏已没了; 竞争报告里的函数名 selectFollowTab 换成 applyFollowTab。
…一组。用 uiFollowTagsOrdered(顺序固定的那份)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
改动
follow.go的viewFollowPane整列删除,viewFollowGroupSelect接手):选组是主动动作,常驻一栏只为这一件事占地;内容区现在一行顶到窗口右缘。followPaneTitle复用),页头新增 24 号「我的关注」+ 总数徽章——页名不换,下拉跟着组换(上游 index.tsx:206 那支的口径)。flatSolid实心底,当前值淡底。MustParseSVG实测 70 分配 / 5.4KB,关注页帧预算实测顶爆(+56 分配 / +5.9KB)。修掉的两个真 bug(TDD 抓出来的)
SelectBase的值绑在暂存格上 →choose()写在输入处理里、回填在视图构建里跑,顺序反过来把用户那一选抹掉;改绑f.tab本体。Changed()放在Popup之前查 →applyInputs跑的时候这帧的 Item 还没建出来,choose()落空;改为放在Popup之后。测试
follow_test.go/ticket213_test.go/realdata_test.go/currentitem_test.go全部改为「断言前先点开下拉」;ticket213换成弹层口径(分界线、长名截断、三态、收起那一格跟组换)。follow_grid_test.go列数断言 3→4(左栏收掉后同窗口网格宽 948→1148,过 1024 档)。internal/e2e/follow_test.go:真窗口上种假登录态 → 按 id 发 press 点侧栏「我的关注」→ 点开分组下拉 → Esc 收弹层。E2E 基础加startRealAppWith/seedFakeSession(假 SESSDATA 只让侧栏那一项显示,B 站那拉真发真败——「分组没拉出来」是真实路径)。验证
go build -trimpath -p 4 ./... && go vet -trimpath -p 4 ./...✅go test -p 4 $(go list ./... | grep -v '/internal/ui$')✅go test ./internal/ui/失败集与 main 对拍:仅计时噪声差异,无分支引入的失败BIU_RUN_MYGO_E2E=1 go test -tags e2e ./internal/e2e/ -run TestTheFollowGroupSelect✅(19.97s)CodeAnt-AI Description
将关注分组选项收进页头下拉,让关注列表获得更多空间
What Changed
Impact
✅ 更宽的关注列表✅ 分组切换后显示对应关注内容✅ 加载失败时可重试,空分组状态更清楚💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.