Skip to content

Feat: Added rippler for AccountListItemSkin#6306

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

Feat: Added rippler for AccountListItemSkin#6306
KSSJW wants to merge 8 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
@Glavo

Glavo commented Jul 8, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76569a9557

ℹ️ 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".

@KSSJW

KSSJW commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@KSSJW

KSSJW commented Jul 8, 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 inside a RipplerContainer to add ripple effects and cursor styling, and introduces a separate Region for the background. The reviewer noted that because AccountListItemSkin inherits from SkinBase without overriding layoutChildren, adding multiple child nodes directly to getChildren() may cause layout and resizing issues. They recommended overriding layoutChildren or wrapping the nodes in a layout container like StackPane.

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 9, 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 by wrapping the root layout in a RipplerContainer (rootRippler) to support ripple effects, and moves click handling and tooltips to this container. It also introduces a background Region for styling. The reviewer identified an issue where applying the shadow depth to the nested background region causes the shadow to be clipped by the parent rootRippler due to overflow hiding, and suggested applying the depth effect directly to rootRippler 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.

@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

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.

2 participants