Skip to content

Refactor: ModDownloadListPageSkin#6375

Open
KSSJW wants to merge 2 commits into
HMCL-dev:mainfrom
KSSJW-Contribution:mod-download-list-page-skin-refactor
Open

Refactor: ModDownloadListPageSkin#6375
KSSJW wants to merge 2 commits into
HMCL-dev:mainfrom
KSSJW-Contribution:mod-download-list-page-skin-refactor

Conversation

@KSSJW

@KSSJW KSSJW commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

重构了ModDownloadListPageSkin

  • 原来的面板导致列表区空间较小。
  • 相较于分类排序使用,游戏名称应该才是最频繁使用的。

实况

更改前 更改后(默认隐藏) 更改后(点击展开)
1 2 3

@KSSJW

KSSJW commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the search panel layout in DownloadListPage.java from a GridPane to a VBox with collapsible HBox rows, introducing an expand/collapse toggle button for advanced search options. The review feedback highlights a bug where nested buttons are created when updating the toggle button's graphic, as well as redundant GridPane.setHgrow layout constraints applied to the new HBox rows inside the VBox container.

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.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java Outdated
@KSSJW

KSSJW commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the search pane layout in DownloadListPage from a GridPane to a VBox containing nested HBox rows. It introduces an expandable layout where advanced search options (like game version, category, and sorting) are placed in a secondary row that can be toggled via an expand button. Additionally, various layout properties, such as preferred widths and alignments, have been adjusted to accommodate this new structure. There are no review comments, and I have no feedback to provide.

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.

@KSSJW KSSJW left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@KSSJW KSSJW marked this pull request as ready for review July 11, 2026 15:58
@Minecraft269

Minecraft269 commented Jul 11, 2026

Copy link
Copy Markdown

CC @Glavo 我关于这个界面有几种方案 不知道可行性怎么样 以及是否值得考虑:

1.这个地方跟随list一起滚动 类似于MC百科的效果

2.或者就浓缩为一行点击进入到一个界面 里面进行编辑筛选条件

3.或者类似于那种emmm... 就像是Github这种效果(你在这个PR就可以看到(滚动到这里)) 你可以看到在页面顶部有title 这个title就是筛选条件

4.或者就是跟随滚动 然后整个编辑筛选条件的地方滚动到看不见的地方时就浓缩为一行 然后在往上滚动时有"阻尼" 就是滚动到顶部后还要停一下在"用力"把上面的筛选拖下来

@ToobLac

ToobLac commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

建议“名称”和“游戏”互换位置,以及把这个类重命名为DownloadListPageSkin或者AddonDownloadListPageSkin,我之前忘记重命名了

@ToobLac

ToobLac commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

CC @Glavo 我关于这个界面有几种方案 不知道可行性怎么样 以及是否值得考虑:

个人建议不要随便 at 人,除非你是本 pr 作者想申请他人 review

1.这个地方跟随list一起滚动 类似于MC百科的效果

要这样的话如果我翻了半天发现没有我想要的模组还得重新翻回去,有点麻烦。MC百科那个是因为屏幕比较大,不需要太多滚动,所以能这么干,HMCL则不行

2.或者就浓缩为一行点击进入到一个界面 里面进行编辑筛选条件

这样更麻烦

3.或者类似于那种emmm... 就像是Github这种效果(你在这个PR就可以看到(滚动到这里)) 你可以看到在页面顶部有title 这个title就是筛选条件

现在不就是这样吗

4.或者就是跟随滚动 然后整个编辑筛选条件的地方滚动到看不见的地方时就浓缩为一行 然后在往上滚动时有"阻尼" 就是滚动到顶部后还要停一下在"用力"把上面的筛选拖下来

其实这样不如本PR现在的情况(

@Minecraft269

Copy link
Copy Markdown

个人建议不要随便 at 人,除非你是本 pr 作者想申请他人 review

彳亍

要这样的话如果我翻了半天发现没有我想要的模组还得重新翻回去,有点麻烦。MC百科那个是因为屏幕比较大,不需要太多滚动,所以能这么干,HMCL则不行

为什么不整个"回到顶部"按钮呢

这样更麻烦

没多大问题吧

现在不就是这样吗

image 是吗? 这不还是一整块在这上面? 我的意思是像Github这样 image 上面有个title这里的title写得是分类(而不是一整块)

@Wulian233

Copy link
Copy Markdown
Contributor

我感觉修改后没有原来的直观。右边只有一个小三角,并没有告知作用是什么。不对齐的格子也有点诡异

@ToobLac

ToobLac commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

不对齐的格子也有点诡异

我记得之前有人提过要再加一个面板项目的,这样凑成 3x2 的应该会好很多

@ToobLac

ToobLac commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

上面有个title这里的title写得是分类(而不是一整块)

哦哦哦,懂了。但还是感觉没啥意义(

@Minecraft269

Copy link
Copy Markdown

哦哦哦,懂了。但还是感觉没啥意义(

个人感觉挺好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants