Repository navigation
关注页卡片清爽化:瘦卡 + 加列(参照网易云关注页) - #740
Merged
Merged
Conversation
- 头像边长 128→96,卡内留白 16→12,名字字号 18→16,签名 MaxLines(2)→MaxLines(1) - 新增 followColumnsFor:关注页专属断点表(1536/1280/1024/768 → 7/6/5/4,<768→3), 与首页歌卡断点刻意不同(人像卡比歌卡窄,密度参考网易云关注页) - 更新相关测试与注释,注明用户 2026-11-03 拍板
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,不启动真实登录态。 |
|
viewFollowCardGuarded 原来调 selectedCell(i, f.cols)——f.cols 要等 keepFollowAnchor 先拿旧列数算完锚点、画完这一段才换,而格子已经按新 列数摆了。换列数那一帧高亮拿旧列数去算「游标在第几格」,落错行: 选中行秃掉最后一格、下一行多一块环。 viewFollowRow 把它正在摆的 cols 顺着传下来,selectedCell 吃这一帧的 列数。f.cols 的赋值时序不动(keepFollowAnchor 依赖先算锚点后换列数)。 过渡帧无头 Tester 截不到(SetSize/Frame 内部会把帧推进到底),回归 钉在源码上:不许把 f.cols 递回给 selectedCell。 grid.go 那张表的注释也顺手换了:它管的是歌卡密度,人像卡更密那张表 在 follow.go——别让人把 followColumnsFor 改回去。
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
改动
followColumnsFor,关注页专属断点表(1536/1280/1024/768 → 7/6/5/4,<768→3),与首页歌卡断点刻意不同——人像卡比歌卡窄,密度参照网易云关注页新旧列数对照
测试
follow_cols_test.go:followColumnsFor断点边界断言 + 瘦卡尺寸断言(头像 96、留白 12、名字 16、签名一行)follow_grid_test.go:1400 窗口下 5 列(原 4 列),留白断言 16→12follow_test.go:名字字号断言 18→16,签名加一行断言follow_grid_shot_test.go:列数等待逻辑改用followColumnsFor,注释更新Shot PNG(深浅两套):
验证
go build -trimpath -p 4 ./...✅go vet -trimpath -p 4 ./...✅go test -p 4 $(go list ./... | grep -v '/internal/ui$')✅go test ./internal/ui/ -run 'Follow|CardCol|AvatarE2E|BackToTop|DisplayMode|CurrentStyle'✅go test ./internal/e2e/ -run Follow:跳过(e2e 编译错是 main 上已知问题,见 AGENTS.md 允许清单)已知风险
CodeAnt-AI Description
Make followed-user cards more compact and show more per row
What Changed
Impact
✅ More followed creators per row✅ Shorter, more compact follow cards💡 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.