Feat: Add colors for addon channel icons in DownloadPage#6441
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the addon channel icons (Alpha, Beta, and Release) in DownloadPage.java to use specific fill colors. However, the implementation uses string-based CSS lookups (e.g., lookup(".svg")), which is fragile and violates encapsulation. It is recommended to expose a type-safe fill property or method on SVGContainer to safely apply these colors instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces styling for addon channel icons (Alpha, Beta, and Release) on the download page by assigning specific style classes to the SVG containers and defining their color fills in the CSS. A review comment suggests refactoring the switch-case block in DownloadPage.java to eliminate repetitive code when creating and styling these icons.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the rendering of addon channel icons (Alpha, Beta, Release) in the download page by dynamically applying CSS style classes to the SVG icons, and defines the corresponding colors in both light and dark theme stylesheets. A review comment suggests adding a null check for dataItem.versionType() before the switch statement to prevent a potential NullPointerException if the external API returns null.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the version type icon rendering in DownloadPage.java by dynamically applying CSS style classes (alpha, beta, release) to the SVG icons and defining their colors in both light and dark theme CSS files. The reviewer suggested refactoring the traditional switch statement to a modern Java 14+ arrow-syntax switch expression to improve readability, prevent fall-through bugs, and maintain consistency with the rest of the codebase.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
这让我想起以前吐槽没有颜色的问题,但当时只解决了字母问题。 |
|
有必要硬编码颜色吗?尽量映射到颜色角色上吧。 |
|
用 CurseForge 和 Modrinth 都使用固定的颜色,个人认为 PR 目前的配色方法 (硬编码) 没什么问题。 另,CurseForge 的 beta 使用紫色,alpha 使用黄色。 |


为
DownloadPage中的addon channel icons添加了颜色实况