Skip to content

Feat: Added rippler for AccountListItemSkin#6306

Open
KSSJW wants to merge 5 commits into
HMCL-dev:mainfrom
KSSJW-Contribution:account-list-item-skin-rippler
Open

Feat: Added rippler for AccountListItemSkin#6306
KSSJW wants to merge 5 commits into
HMCL-dev:mainfrom
KSSJW-Contribution:account-list-item-skin-rippler

Conversation

@KSSJW

@KSSJW KSSJW commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

AccountListItemSkin添加了水波纹效果

实况

1.mp4

  • background.setStyle("-fx-background-color: -monet-surface-container-low-transparent-80; -fx-background-radius: 4;");仍然来自原来的card背景样式:
.card {
    -fx-background-color: -monet-surface-container-low-transparent-80;
    -fx-background-radius: 4;
    -fx-padding: 8px;

    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 10, 0.12, -1, 2);
}

@KSSJW

KSSJW commented Jul 4, 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 AccountListItemSkin by replacing the card depth effect with a RipplerContainer and a background Region to support custom styling and ripple effects. The review feedback points out a critical issue where mouse events can bypass the rootRippler because its child elements are transparent and pickOnBounds is false by default. It suggests explicitly setting rootRippler.setPickOnBounds(true) to ensure clicks and ripple effects are properly triggered across the entire item.

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/account/AccountListItemSkin.java Outdated
@KSSJW

KSSJW commented Jul 4, 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 AccountListItemSkin UI component by wrapping the root pane in a RipplerContainer to introduce ripple effects, replacing the card style and depth manager with a custom background Region, and setting the center HBox to mouse transparent. The review feedback highlights two issues: first, setting the center HBox to mouse transparent breaks the tooltip on the subtitle, so it is recommended to attach the tooltip to root or rootRippler instead; second, removing the depth manager removes the card's shadow effect, so it is suggested to apply the depth manager to the new background region and ensure it is mouse transparent.

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 commented Jul 4, 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 AccountListItemSkin by wrapping the root BorderPane in a RipplerContainer to add ripple effects, and introducing a styled background region. The review feedback highlights an issue where the tooltip for Authlib Injector accounts fails to trigger because the center container is mouse-transparent and the root's bounds picking is affected by the rippler. To fix this, the reviewer suggests initializing rootRippler at the beginning of the constructor and installing the tooltip directly on it instead of root.

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/account/AccountListItemSkin.java Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/account/AccountListItemSkin.java Outdated
@KSSJW

KSSJW commented Jul 4, 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 account list item UI in HMCL by wrapping the root layout in a RipplerContainer to enable ripple effects, and introducing a separate background Region with rounded corners and depth. The reviewer pointed out a visual issue where the rectangular RipplerContainer's hover and ripple effects will overflow the background's rounded corners, and suggested clipping the container using FXUtils.setOverflowHidden to match the card's border radius.

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 marked this pull request as ready for review July 4, 2026 09:07
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.

1 participant