CodeMonkeyLab [Mon, 9 Aug 2021 11:49:35 +0000 (12:49 +0100)]
Updated the version of vaadin-context-menu (#12363)
Moving to new version removes the warning
com.vaadin.event.EventRouter addListener WARNING: Adding listeners with type Object is deprecated, event listener should extend SerializableEventListener
Tatu Lund [Mon, 9 Aug 2021 10:36:39 +0000 (13:36 +0300)]
fix: Prevent deadlock in findOrCreateVaadinSession (#12355)
It is possible findOrCreateVaadinSession leaves session locked if HTTP session is invalidated in an another thread between lockSession and unlockSession calls. This PR changes the implementation so that this can no longer happen.
Anna Koskinen [Fri, 23 Jul 2021 12:41:25 +0000 (15:41 +0300)]
Checkstyle fixes (#12347)
- Added, completed, and corrected JavaDocs.
- Added an assert to enforce a condition that has always been required.
- Added default sections to switch blocks.
- Added wildcards.
- Deprecated unused methods and variables.
- Removed inner assignments.
- Removed unused private variables and calls that do nothing.
- Updated deprecated calls to use currently recommended versions.
- Updated warning suppressions.
- ...and some auto-formatting.
Anna Koskinen [Wed, 23 Jun 2021 12:29:23 +0000 (15:29 +0300)]
fix: don't serve directories as static files (#12325)
Also prevents opening FileSystem for unknown schemes.
Modified cherry-picks of https://github.com/vaadin/flow/pull/11072 ,
https://github.com/vaadin/flow/pull/11147 , and
https://github.com/vaadin/flow/pull/11235
Zhe Sun [Mon, 31 May 2021 07:15:11 +0000 (10:15 +0300)]
Small updates to servlet container test setup. (#12318)
* Small updates to servlet container test setup.
- Upgraded to use cargo-maven3-plugin since cargo-maven2-plugin is now
EOL.
- Defined supported packagings as the current jetty-maven-plugin default
only covers war.
- Changed a test pojo to implement Serializable in order to prevent an
error in cargo-maven3-plugin stop-container phase.
Anna Koskinen [Fri, 7 May 2021 08:32:07 +0000 (11:32 +0300)]
Fix TabSheetElement clicks for IE, test tweaks. (#12291)
- Backspace navigation hasn't worked in years thanks to new browser
standards, removed related tests. Left a test for regular backspace use
within a modal window.
- Enabled a modal window test for Chrome since it seems to be working
now, removed extending of another test class to avoid running the tests
twice without any configuration changes.
- Adjusted browser width limitation.
- Added screenshots.
Tatu Lund [Mon, 19 Apr 2021 07:52:08 +0000 (10:52 +0300)]
Add browser specific handling in setRows (#12141)
* Add browser specific handling in setRows
Fixes: https://github.com/vaadin/framework/issues/10138 Fixes: https://github.com/vaadin/framework/issues/7878
* Enforced minimum height to 1 rows and added a test.
Anna Koskinen [Wed, 31 Mar 2021 05:34:29 +0000 (08:34 +0300)]
Fix Window dragging on touch screen. (#12260)
- Added check for touch move event in order to allow the same flow for
both mouse and touch events when dragging a Window by its header.
- Can be tested with SubwindowDraggability class.
Fixes #12257
Co-authored-by: Jakub Antoniak <j.antoniak8@gmail.com>
Tatu Lund [Thu, 18 Mar 2021 16:12:37 +0000 (18:12 +0200)]
feat: Add API to control whether Binder converts back to presentation (#12246)
#12132 fixed an old bug, conversion was not done back, which was a regression from Vaadin 7. However since the bug has been present long time, it has become established behavior, thus there may be need to disable conversion back to presentation sometimes, thus this API as added.
- Physical index should take into account that more than one row can
have a spacer. Physical index has no practical effect on how Grid looks
like or behaves, since Escalator by design operates independently of it
and the visual positioning of elements is based on the logical and
visual indices. Physical index only affects the order of elements
within the DOM tree, where a mismatch can cause confusion during
debugging.
Anna Koskinen [Mon, 8 Mar 2021 11:18:11 +0000 (13:18 +0200)]
Fix updating Grid's item set when details rows are open. (#12231)
- Old details should close.
- New details should open.
- If some row has details in both old and new item set, the details row
contents should get updated.
- Updating details row contents should not break the positioning of the
rows and details below.
Anna Koskinen [Wed, 3 Mar 2021 11:59:50 +0000 (13:59 +0200)]
Remove whitespace-maven-plugin and formatter-maven-plugin. (#12213)
- These plugins cause significant problems for many Windows developers,
and since most active maintainers are currently included in that group,
the plugins have been deemed more trouble than they are worth.
Anna Koskinen [Fri, 26 Feb 2021 13:49:47 +0000 (15:49 +0200)]
Merged column headers should work within declarative Grid. (#12206)
- null check to prevent NPE from the merged column headers
- convert to internal columnIds for merge handling
- use correct cell in merge handling
- switch away from streams in merge handling for easier readability
- regression test
Anna Koskinen [Thu, 11 Feb 2021 13:55:21 +0000 (15:55 +0200)]
Clear out ClientCache when UI is detached to prevent a minor memory leak (#12199)
* Clear out ClientCache when UI is detached to prevent a minor memory leak
Implemented with a listener rather than direct call from UI.detach() in
order to avoid new public API, since the whole feature has been marked
for removal. This doesn't yet prevent the cache or the type map from
getting slightly bloated during the UI's lifetime.
Tatu Lund [Fri, 29 Jan 2021 11:32:09 +0000 (13:32 +0200)]
fix: use time-constant comparison for security tokens (#12189)
This is the same as https://github.com/vaadin/framework/pull/12188,
but also applied for the upload security key
and the push id since both of those are also used to protect against
cross-site attacks. In addition, documentation for the push id is
clarified to point out its role.
Tatu Lund [Thu, 7 Jan 2021 11:21:46 +0000 (13:21 +0200)]
Move call to getMessageHandler().onResynchronize(); to right place (#12178)
https://github.com/vaadin/framework/pull/12043 changed resync message sending to be deferred to queue. Now also the setting of the semaphor in message handler needs to be deferred to its right place. Otherwise there is possibility for a timing glitch. I.e. MessageHandler is set to resync handling mode before message is actually send.
Anna Koskinen [Fri, 18 Dec 2020 11:16:26 +0000 (13:16 +0200)]
Fix to LayoutManager size calculations during transform. (#12138)
* Fix to LayoutManager size calculations during transform.
- ComputedStyle is slower but more reliable than using
getBoundingClientRect, which does not work as expected if a transform
has been applied to the element or one of its parents. This is a problem
e.g. with PopupView, where getBoundingClientRect will return too small
size (or even zero size) for all the popup contents while the opening
animation is active. ComputedStyle ignores the transform and returns the
expected value.
- The presence of the element in DOM must be checked before the size is
requested from ComputedStyle, if the element has disappeared from DOM
without a warning and calculation is attempted anyway, the browser gets
stuck.
- Possibility to configure LayoutManager to use the less reliable
calculations for applications where the slight performance difference is
more important than layout issues within elements that have transform
animations.
- Manual test, problem isn't reproducible by TestBench.
Anna Koskinen [Tue, 10 Nov 2020 09:51:25 +0000 (11:51 +0200)]
Tweaks to Grid/Escalator column size handling (#12145)
- 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)
Tatu Lund [Thu, 22 Oct 2020 11:16:17 +0000 (14:16 +0300)]
Use generated id of the menu item to help testing of the menubar (#12124)
Use generated IDs for MenuItems when an ID is set for MenuBar. Tying the ID to MenuBar's ID helps with the possible case of having multiple MenuBars on the same view and avoids to have excess id's when not needed.
Anna Koskinen [Mon, 12 Oct 2020 11:42:40 +0000 (14:42 +0300)]
When a Grid gets scroll-locked, cancel the scrollInProgress handler. (#12116)
Otherwise opening a Grid editor can cause ApplicationConnection to get
stuck in 'active' state even if no actual scroll position processing is
ongoing, which in turn causes TestBench delays when it tries to wait
until ApplicationConnection indicates that everything necessary has been
processed.