RFR: 8323511 Scrollbar Click jumps inconsistent amount of pixels

Johan Vos jvos at openjdk.org
Wed Jan 10 12:54:33 UTC 2024


On Wed, 10 Jan 2024 12:31:20 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

> As seen in the unit test of the PR, when we click on the area above/below the scrollbar the position jumps - but the jump is now not always consistent.
> In the current version on the last cell - the UI always jumps to the top. In the other cases, the assumed default cell height is used.
> 
> With this PR, always the default cell height is used, to determine how much is scrolled.
> This makes the behavior more consistent.
> 
> Especially from the unit-test, it's clear that with this PR the behavior is much more consistent.
> 
> This is also related to the following PR: https://github.com/openjdk/jfx/pull/1194

Thanks for the PR!
Quick observations:

* The unit test is indeed clear and at first sight, it looks to me that this is reasonable behavior. One of the hard parts with the VirtualFlow and related concepts, is that different use case scenarios assume different "reasonable behavior". Since we now have more tests than before, I am increasingly confident that a new change to the behavior is not causing regression.

* Until we have the exact heights of all cells, the different measurable values (thumb location of scrollbar, position of the cell) can not be set simultaneously to desired values. (That is one of the other hard parts). Hence, changing the behavior of the scrollbar may affect the accuracy of the cell positioning in other scenario's. Again, since we have a growing amount of tests, I'm less worried about this.

I'll look into this more detailed.

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

PR Comment: https://git.openjdk.org/jfx/pull/1326#issuecomment-1884795204


More information about the openjfx-dev mailing list