On Thu, 16 May 2024 18:30:17 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> Root cause: premature 'return' from initialization code leaves the hover 
> square visible, even when it should be hidden, as the case is when the color 
> value is not present in the palette.
> 
> - added unit tests

Fix looks good, I think a single reviewer is sufficient for this. But please do 
wait for a while, may be for a day before integrating.

I do have an observation to share:
Another way to look at the root cause of the issue is that the `hoverSquare`'s  
visible property is not initialized in the `ColorPalette` constructor.  
The `hoverSquare` should **not** be visible by default, so adding this 
`hoverSquare.setVisible(false);` to `ColorPalette` constructor also solves the 
problem.
Compared to PR change, this would avoid setting the visible property of 
focusSquare to false repeatedly in scenario when user keeps selecting custom 
color repeatedly.

Anyway the fix is good, approving.
Shall re-approve if you make any change.

-------------

Marked as reviewed by arapte (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/1458#pullrequestreview-2062612821

Reply via email to