]> source.dussan.org Git - vaadin-framework.git/commit
Tweaks to Grid/Escalator column size handling (#12145) (#12157)
authorAnna Koskinen <Ansku@users.noreply.github.com>
Tue, 1 Dec 2020 12:46:27 +0000 (14:46 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Dec 2020 12:46:27 +0000 (14:46 +0200)
commit8496f92a130e322fba050dc75aca9a88a34cce6f
tree6a6cc35e0897a1d3929c2721062f124ca6b133f4
parent24c52166dd41411c21350aabb8ef7490c83c0697
Tweaks to Grid/Escalator column size handling (#12145) (#12157)

- ScrollbarBundle: removed delays in scroll handling that were only
needed for IE8, added possibility to update offsetSize and scrollSize at
the same time in order to avoid triggering unnecessary scrollbar
visibility change events during the intermediate state.
- ColumnConfigurator: added new method that allows setting column widths
without triggering element size recalculations.
- EscalatorProxy: added implementation of the new method to
ColumnConfigurationProxy.
- Escalator: switched to use new methods in ScrollbarBundle and
ColumnConfigurator, added a pixel to a scrollbar offsetSize calculation
that was for some reason consistently one pixel too low, removed
duplicate method calls from sectionHeightCalculated handling as those
are already handled by the calling method and can cause incorrect
intermediate state and unnecessary scrollbar visibility change events,
added implementation of the new method to ColumnConfigurationImpl with
the element size recalculations made optional.
- Grid: updated column minimum width calculations to take into account
the potential presence of a resize handle, updated expand ratio handling
to not trigger element size recalculations until the entire handling is
finished.
- Test for column width handling when there are multiple columns with
setMinimumWidthFromContent(false)

Fixes #12139
client/src/main/java/com/vaadin/client/widget/escalator/ColumnConfiguration.java
client/src/main/java/com/vaadin/client/widget/escalator/ScrollbarBundle.java
client/src/main/java/com/vaadin/client/widgets/Escalator.java
client/src/main/java/com/vaadin/client/widgets/Grid.java
uitest/src/main/java/com/vaadin/tests/components/grid/GridColumnsNoMinimumWidthFromContent.java [new file with mode: 0644]
uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/EscalatorProxy.java
uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnsNoMinimumWidthFromContentTest.java [new file with mode: 0644]