Revert "feat(download): 折叠前置资源列表"#3082
Conversation
This reverts commit e8db05a.
审阅者指南回退之前为模组依赖添加的可折叠 dependency-bar 界面,并移除对应的 MyCollapseBar 控件,将 CompFiles 卡片中的依赖列表布局恢复为更简单、始终展开的形式。 文件级更改
提示与命令与 Sourcery 交互
自定义你的体验前往你的仪表盘:
获取帮助Original review guide in EnglishReviewer's GuideReverts the previously added collapsible dependency-bar UI for mod dependencies and removes the associated MyCollapseBar control, restoring a simpler, always-expanded dependency list layout for CompFiles cards. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d284327f0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| foreach (var dep in optionalDeps) | ||
| { | ||
| var item = compProjectCache[dep].ToCompItem(false, false); | ||
| stack.Children.Add(item); |
There was a problem hiding this comment.
Keep optional dependencies from burying versions
When a project version has many optional dependencies (the previous code explicitly called out library mods/Issue #2873), this loop adds every optional dependency to the visible stack before the actual version list is appended in PageDownloadCompDetail after CompFilesCardPreload. Users opening that version card must now scroll through all optional dependency placeholders/items before reaching the downloadable versions, and the lazy-load behavior will realize them as they enter the viewport; keep optional dependencies collapsed or otherwise hidden until requested.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Hey - 我在这里给出一些高层次的反馈:
deps和optionalDeps的过滤逻辑都重复了相同的Sort+Where+ 日志记录模式;可以考虑提取一个小的辅助方法来减少重复代码,并在未来更改时保持行为一致。- 在过滤依赖时,你对
compProjectCache.ContainsKey(dep)调用了两次(一次在if语句中,一次在返回语句中);改用TryGetValue可以避免重复查找,也能让代码更清晰一些。
给 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- The filtering logic for `deps` and `optionalDeps` repeats the same `Sort` + `Where` + logging pattern; consider extracting a small helper method to reduce duplication and keep behavior consistent for future changes.
- When filtering dependencies you call `compProjectCache.ContainsKey(dep)` twice (once in the `if` and once in the return); switching to `TryGetValue` would avoid redundant lookups and make the code slightly clearer.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The filtering logic for
depsandoptionalDepsrepeats the sameSort+Where+ logging pattern; consider extracting a small helper method to reduce duplication and keep behavior consistent for future changes. - When filtering dependencies you call
compProjectCache.ContainsKey(dep)twice (once in theifand once in the return); switching toTryGetValuewould avoid redundant lookups and make the code slightly clearer.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The filtering logic for `deps` and `optionalDeps` repeats the same `Sort` + `Where` + logging pattern; consider extracting a small helper method to reduce duplication and keep behavior consistent for future changes.
- When filtering dependencies you call `compProjectCache.ContainsKey(dep)` twice (once in the `if` and once in the return); switching to `TryGetValue` would avoid redundant lookups and make the code slightly clearer.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Reverts #2986
this PR is unnecessary
Summary by Sourcery
还原针对 comp 文件依赖的可折叠依赖栏,并恢复必需和可选依赖列表的直接渲染。
Enhancements:
MyCollapseBar的依赖列表可折叠界面,在 comp 文件卡片中以内联方式渲染必需和可选依赖。Original summary in English
Summary by Sourcery
Revert collapsible dependency bars for comp file dependencies and restore direct rendering of required and optional dependency lists.
Enhancements: