]> source.dussan.org Git - vaadin-framework.git/log
vaadin-framework.git
4 years agoRefresh DataProvider only once when reordering the grid using GridRowDragger (#11981... 8.10 8.10.5
Anna Koskinen [Mon, 11 May 2020 12:00:53 +0000 (15:00 +0300)]
Refresh DataProvider only once when reordering the grid using GridRowDragger (#11981) (#11992)

Fixes #10844

Authored-by: Martín López <mlopez@flowingcode.com>
4 years agoRemoved unused parameter from DataNode creation (#11976) (#11991)
Anna Koskinen [Mon, 11 May 2020 11:49:54 +0000 (14:49 +0300)]
Removed unused parameter from DataNode creation (#11976) (#11991)

* Removed unused parameter from DataNode creation (#11976)

Fixes #11958

4 years agoJavaDoc fix (#11950) (#11990)
Anna Koskinen [Mon, 11 May 2020 10:35:01 +0000 (13:35 +0300)]
JavaDoc fix (#11950) (#11990)

* Fixed the JavaDoc (#11950)

HierarchyMapper. getParentIndex() method has a different JavaDoc from the HierarchicalDataCommunicator. This is a simple fix for that.

https://github.com/vaadin/framework/blob/master/server/src/main/java/com/vaadin/data/provider/HierarchyMapper.java#L96

4 years agoFix sanitization of empty RTA input for Firefox & IE (#11937) (#11989)
Anna Koskinen [Mon, 11 May 2020 09:04:48 +0000 (12:04 +0300)]
Fix sanitization of empty RTA input for Firefox & IE (#11937) (#11989)

Browsers differ in what they return as the content of a visually empty rich text area (RTA). Accordingly, RTA sanitizes these different values ensuring an empty string is returned to the framework. However, existing sanitization criteria doesn't work for Firefox 74 and Internet Explorer 11.

This fix appends the sanitization criteria of Firefox 74 and IE 11, ensuring an empty string is returned to the framework for a a visually empty RTA.

Closes #10338

Authored-by: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com>
4 years agoFix RTA's CreateLink in Firefox & IE11 (#11979) (#11987)
Anna Koskinen [Fri, 8 May 2020 13:09:07 +0000 (16:09 +0300)]
Fix RTA's CreateLink in Firefox & IE11 (#11979) (#11987)

* Fix RTA's CreateLink in Firefox & IE11 (#11979)

In Firefox and IE11, the 'Create Link' button of the RichTextArea (RTA) only works by turning some highlighted text into a link (by adding the inserted URI as the href property of the text). In that, the RTA in these two browsers behave similarly to the way it does in Chrome and Edge. However, in Firefox and IE11, clicking the 'Create Link' button has no effect if no text is pre-selected by the user. This is different from the button's behavior in Chrome and Edge where the user's provided URI is inserted, both, as the displayed text and its href property if no text is highlighted.

This fix enables the RTA's 'Create Link' button to work consistently across the supported browsers. Specifically, (and in addition to enabling adding the href property of a highlighted text), this fix enables Firefox and IE11 to also insert a new Uri as a text and its href property if no text is already highlighted.

fixes #11888

4 years agoTake overlays into account in getConnectorForElement. (#11980) (#11983)
Anna Koskinen [Tue, 5 May 2020 10:12:21 +0000 (13:12 +0300)]
Take overlays into account in getConnectorForElement. (#11980) (#11983)

* Take overlays into account in getConnectorForElement. (#11980)

Fixes #11212

4 years agoAllow replacing all columns at once when some of them are frozen. (#11982)
Anna Koskinen [Tue, 5 May 2020 09:19:04 +0000 (12:19 +0300)]
Allow replacing all columns at once when some of them are frozen. (#11982)

* Allow replacing all columns at once when some of them are frozen. (#11978)

Fixes #11824

4 years agoFix hiding / un-hiding with frozen columns in multiselect mode (#11972) (#11975)
Anna Koskinen [Tue, 28 Apr 2020 13:03:19 +0000 (16:03 +0300)]
Fix hiding / un-hiding with frozen columns in multiselect mode (#11972) (#11975)

The previous patch https://github.com/vaadin/framework/pull/11951 did fix the problem (frozen column indicator wrongly positioned)  it was meant to, but caused a regression in hiding / un-hiding.

This new fix addresses both problems, i.e. it applies multiselect column compensation in other way, without causing problem in hiding / un-hiding logic

Fixes https://github.com/vaadin/framework/issues/11970

4 years agoDon't center a window that has already been removed. (#11956) (#11969) 8.10.4
Anna Koskinen [Fri, 24 Apr 2020 10:40:15 +0000 (13:40 +0300)]
Don't center a window that has already been removed. (#11956) (#11969)

* Don't center a window that has already been removed. (#11956)

* Don't center a window that has already been removed.

Fixes #11942

4 years agoFix incorrect position of column selector in MPR (#11953) (#11968)
Anna Koskinen [Fri, 24 Apr 2020 10:36:58 +0000 (13:36 +0300)]
Fix incorrect position of column selector in MPR (#11953) (#11968)

* Fix incorrect position of column selector in MPR (#11953)

Cherry pick from
https://github.com/vaadin/framework/pull/11946

4 years agoAdd multiselect column compensation (#11951) (#11967)
Anna Koskinen [Fri, 24 Apr 2020 10:33:38 +0000 (13:33 +0300)]
Add multiselect column compensation (#11951) (#11967)

* Add multiselect column compensation (#11951)

4 years agoUpdating Chrome version (#11952) (#11966)
Anna Koskinen [Fri, 24 Apr 2020 10:31:12 +0000 (13:31 +0300)]
Updating Chrome version (#11952) (#11966)

* Updating Chrome version (#11952)

4 years agoUpdate Liferay kernel version (#11943) (#11965)
Anna Koskinen [Fri, 24 Apr 2020 10:26:39 +0000 (13:26 +0300)]
Update Liferay kernel version (#11943) (#11965)

* Update Liferay kernel version (#11943)

Liferay 7.3 series have kernel version 10.x, i.e. limit needs to be extended from 10 -> 11

Fixes: https://github.com/vaadin/framework/issues/11938
4 years agoExpired session: use 403 Forbidden instead of 410 Gone (#11859) (#11964)
Anna Koskinen [Fri, 24 Apr 2020 10:23:39 +0000 (13:23 +0300)]
Expired session: use 403 Forbidden instead of 410 Gone (#11859) (#11964)

* Expired session: use 403 Forbidden instead of 410 Gone (#11859)

Use 403 Forbidden instead of 410 Gone when session expired. Also prevent caching in more cases.

4 years agoRemove unnecessary null-check at ValueContext constructors (#11915) (#11963)
Anna Koskinen [Fri, 24 Apr 2020 10:19:14 +0000 (13:19 +0300)]
Remove unnecessary null-check at ValueContext constructors (#11915) (#11963)

* Remove unnecessary null-check at ValueContext constructors (#11915)

4 years agoChange to using StringBuilder (#11941) (#11962)
Anna Koskinen [Fri, 24 Apr 2020 10:15:59 +0000 (13:15 +0300)]
Change to using StringBuilder (#11941) (#11962)

* Change to using StringBuilder (#11941)

Should use a StringBuilder to accumulate strings in a loop, to avoid the performance cost of repeatedly constructing strings.

4 years agoFix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797) (#11961)
Anna Koskinen [Fri, 24 Apr 2020 10:12:35 +0000 (13:12 +0300)]
Fix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797) (#11961)

* Fix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797)

Fixes #11806

4 years agoEnsure ChangeListener still works after first upload. (#11936) (#11960)
Anna Koskinen [Fri, 24 Apr 2020 10:02:40 +0000 (13:02 +0300)]
Ensure ChangeListener still works after first upload. (#11936) (#11960)

* Ensure ChangeListener still works after first upload. (#11936)

Fixes #10420

4 years agoEnsure recalculateColumnWidths works with refreshAll. (#11934) (#11959)
Anna Koskinen [Fri, 24 Apr 2020 09:01:32 +0000 (12:01 +0300)]
Ensure recalculateColumnWidths works with refreshAll. (#11934) (#11959)

Column widths shouldn't be calculated between the clearing of cache and
re-populating it, but be delayed until the cache has some content again.
The calculations should only be triggered immediately if no rows are
expected.

Fixes #9996

4 years agoUpdated LayoutTester screenshots for IE and FF. (#11930) (#11933)
Anna Koskinen [Fri, 27 Mar 2020 11:07:13 +0000 (13:07 +0200)]
Updated LayoutTester screenshots for IE and FF. (#11930) (#11933)

* Updated LayoutTester screenshots for IE and FF. (#11930)

* Updated LayoutTester screenshots for IE and FF.

4 years agoFix an issue with frozen column count and unhiding. (#11929) (#11932) 8.10.3
Anna Koskinen [Thu, 26 Mar 2020 13:13:14 +0000 (15:13 +0200)]
Fix an issue with frozen column count and unhiding. (#11929) (#11932)

* Fix an issue with frozen column count and unhiding.

Unhiding logic should take into account that there can be hidden frozen
columns that are not the column currently getting shown.

4 years agoAdd setters to Criterion to fix serialization. (#11926) (#11931)
Anna Koskinen [Thu, 26 Mar 2020 12:55:49 +0000 (14:55 +0200)]
Add setters to Criterion to fix serialization. (#11926) (#11931)

Fixes #11909

4 years agoTweaked layouttester tests to be more informative. (#11800) (#11813) (#11925)
Anna Koskinen [Tue, 24 Mar 2020 12:24:35 +0000 (14:24 +0200)]
Tweaked layouttester tests to be more informative. (#11800) (#11813) (#11925)

4 years agoSimplify Grid sidebar handling. (#11920) (#11924)
Anna Koskinen [Tue, 24 Mar 2020 11:51:20 +0000 (13:51 +0200)]
Simplify Grid sidebar handling. (#11920) (#11924)

There is no need to reset the sidebar for every column that is set
hidable within the same roundtrip. Because no other layouting depends on
the sidebar contents, we can safely delay the reset until all columns
have got their hidabiity status updated. As a bonus point, when the
reset itself is delayed, the headers have time to get populated and the
sidebar button's height can be determined immediately at attach. The
reset ensures that attach is called every time a column's hidability is
changed.

4 years agoPrevent a gap within Grid rows in some resize situations. (#11918) (#11923)
Anna Koskinen [Tue, 24 Mar 2020 10:42:45 +0000 (12:42 +0200)]
Prevent a gap within Grid rows in some resize situations. (#11918) (#11923)

Fixes #11892

4 years agoTrigger re-measure after updating ElementResizeListeners. (#11912) (#11922)
Anna Koskinen [Tue, 24 Mar 2020 09:52:43 +0000 (11:52 +0200)]
Trigger re-measure after updating ElementResizeListeners. (#11912) (#11922)

Removing ElementResizeListeners from an element makes it unmeasurable
and clears any saved measured values. Adding the listeners back makes
the element measurable again but doesn't add it to measuring queue.
Measuring needs to happen or any updates to expanded components within a
layout (without changes that would trigger full re-measuring of the
layout itself) lead to broken expand size calculations with any fixed
size elements assumed to have no size.

Fixes #10734

4 years agoFurther tweaks to ComboBox popup positioning. (#11910) (#11921)
Anna Koskinen [Tue, 24 Mar 2020 09:03:16 +0000 (11:03 +0200)]
Further tweaks to ComboBox popup positioning. (#11910) (#11921)

* Further tweaks to ComboBox popup positioning.

- Updated a comment and renamed a private method for better clarity.
- Blocked unnecessary position updates.
- Added a test for #11866 / #11894.

4 years agoPicks 8.10.2 (#11908) 8.10.2
Zhe Sun [Mon, 2 Mar 2020 10:03:32 +0000 (12:03 +0200)]
Picks 8.10.2 (#11908)

* Removing code causing the  trouble (#11898)

* Removing code causing the  trouble

Removing code that was apparently not needed in previous fix and caused regression

Fixes: https://github.com/vaadin/framework/issues/11895
* Added feature to test UI

* Added test case

* Adding missing import

* Fixing test UI

* Enable DateField

* Rewrote debouncing of onResize (#11899)

* Rewrote debouncing of onResize

Fixes https://github.com/vaadin/framework/issues/11892

* Fixing typo in variable name

* Adding missing setPopupPosition(left, top); (#11902)

* Adding missing setPopupPosition(left, top);

setPopupPosition(left, top); needs to be called in order to top position to be set

Fixes https://github.com/vaadin/framework/issues/11894

Co-authored-by: Tatu Lund <tatu@vaadin.com>
4 years agoAdded note to DateField#setRangeStart JavaDoc (#11886) 8.10.1
Tatu Lund [Wed, 19 Feb 2020 07:18:03 +0000 (09:18 +0200)]
Added note to DateField#setRangeStart JavaDoc (#11886)

* Added note to DateField#setRangeStart JavaDoc

* Added additional checking of valid startDate

* Reverted previous commit

4 years agoUpdate Chrome version (#11891)
Tatu Lund [Tue, 18 Feb 2020 11:27:28 +0000 (13:27 +0200)]
Update Chrome version (#11891)

4 years agoFix logic of lexicographical comparison of DateField range end (#11885)
Tatu Lund [Thu, 13 Feb 2020 07:40:12 +0000 (09:40 +0200)]
Fix logic of lexicographical comparison of DateField range end (#11885)

* Fix logic of lexicographical comparison of DateField range end

Fix logic of lexicographical comparison of DateField range end with large year numbers ( > 9999)

Fixes #11881

* Added tests

Purpose of dateFieldRangeYearDigitsIncrease() is to test that rangeEnd works correctly on 4 to 5 digits change boundary

Purpose of dateFieldRangeYearBigNumbersPopupOpens() is to test that popup opens also when there is more than 4 digits in year

* Fixing typo

* Add error message

* Set the date of the field in test

* Fixing

4 years agoUpdate release note template for 8.10 maintenance
Zhe Sun [Wed, 19 Feb 2020 07:24:07 +0000 (09:24 +0200)]
Update release note template for 8.10 maintenance

4 years agoUpdate release-note template for 8.10 final 8.10.0
Zhe Sun [Thu, 6 Feb 2020 08:47:45 +0000 (10:47 +0200)]
Update release-note template for 8.10 final

4 years agoCherry picks for 8.10 final release (#11883)
Zhe Sun [Tue, 4 Feb 2020 12:43:50 +0000 (14:43 +0200)]
Cherry picks for 8.10 final release  (#11883)

* Don't reset date to current at DateField state (e.g. read-only) updates. (#11879)

- DateFields with month or year resolution should not get their date
reset to current date if the field's state is updated (e.g. by changing
read-only status or adding a range).

Fixes: #11864, #11605
* Update Navigator.getState() JavaDoc to be more accurate (#11876)

Fixes: https://github.com/vaadin/framework/issues/11875
Co-authored-by: Anna Koskinen <Ansku@users.noreply.github.com>
Co-authored-by: Tatu Lund <tatu@vaadin.com>
4 years agodefine central with https 8.10.0.beta1
Zhe Sun [Thu, 16 Jan 2020 17:34:00 +0000 (19:34 +0200)]
define central with https

4 years agoclose <ul>
Zhe Sun [Thu, 16 Jan 2020 12:18:41 +0000 (14:18 +0200)]
close <ul>

4 years agoUpdate release-note for 8.10
Zhe Sun [Thu, 16 Jan 2020 12:05:39 +0000 (14:05 +0200)]
Update release-note for 8.10

4 years agoadd missing since tag
ZheSun88 [Thu, 16 Jan 2020 08:12:00 +0000 (10:12 +0200)]
add missing since tag

4 years agoRemove alpha mentioned in the releasenote
Zhe Sun [Thu, 16 Jan 2020 07:45:09 +0000 (09:45 +0200)]
Remove alpha mentioned in the releasenote

4 years agoTreeDataProvider: Apply filters to children (#11868)
Tatu Lund [Thu, 16 Jan 2020 00:25:46 +0000 (02:25 +0200)]
TreeDataProvider: Apply filters to children (#11868)

Fixes: https://github.com/vaadin/framework/issues/9933
Cherry pick from: https://github.com/vaadin/flow/pull/7317

4 years agoEnsure value change happens before shortcuts in compatibility components (#11871)
Anna Koskinen [Wed, 15 Jan 2020 15:07:14 +0000 (17:07 +0200)]
Ensure value change happens before shortcuts in compatibility components (#11871)

Fixes #10854

4 years agoMaking setEditable friendlier (#11869)
Tatu Lund [Tue, 14 Jan 2020 13:36:15 +0000 (15:36 +0200)]
Making setEditable friendlier (#11869)

* Making setEditable friendlier

The current behavior is not buggy, so this PR is an enhancement

Fixes https://github.com/vaadin/framework/issues/8718

* Improved JavaDoc

4 years agoConvert DateTimeFieldReadOnlyTest to not rely on screenshots. (#11870)
Anna Koskinen [Mon, 13 Jan 2020 18:08:08 +0000 (20:08 +0200)]
Convert DateTimeFieldReadOnlyTest to not rely on screenshots. (#11870)

4 years agoAdded Note about TextField in Header cell (#11858)
Tatu Lund [Mon, 13 Jan 2020 13:42:12 +0000 (15:42 +0200)]
Added Note about TextField in Header cell (#11858)

Fixes https://github.com/vaadin/framework/issues/9089

4 years agoConvert DateFieldReadOnlyTest to not rely on screenshots. (#11867)
Anna Koskinen [Fri, 10 Jan 2020 14:06:45 +0000 (16:06 +0200)]
Convert DateFieldReadOnlyTest to not rely on screenshots. (#11867)

4 years agoRemoved outdated spacer height update from removal process. (#11861)
Anna Koskinen [Thu, 9 Jan 2020 13:09:49 +0000 (15:09 +0200)]
Removed outdated spacer height update from removal process. (#11861)

* Removed outdated spacer height update from removal process.

Fixes #11856

4 years agoAdded notes in JavaDoc of TEXTFIELD_INLINE_ICON (#11860)
Tatu Lund [Wed, 8 Jan 2020 14:52:44 +0000 (16:52 +0200)]
Added notes in JavaDoc of TEXTFIELD_INLINE_ICON (#11860)

* Added notes in JavaDoc of TEXTFIELD_INLINE_ICON

Fixes https://github.com/vaadin/framework/issues/10752 and https://github.com/vaadin/framework/issues/9089

4 years agoFix to RadioButtonGroup readOnly handling. (#11855)
Anna Koskinen [Mon, 23 Dec 2019 07:08:43 +0000 (09:08 +0200)]
Fix to RadioButtonGroup readOnly handling. (#11855)

* Fix to RadioButtonGroup readOnly handling.

Updated the connector to use the widget's enabled and readOnly handling
as intended.

Fixes #11843

4 years agoAdded helper methods for setting only height or width full. (#11854)
Anna Koskinen [Fri, 20 Dec 2019 11:55:29 +0000 (13:55 +0200)]
Added helper methods for setting only height or width full. (#11854)

4 years agoAdded documentation of newly added Binder features (#11845)
Tatu Lund [Fri, 20 Dec 2019 10:47:24 +0000 (12:47 +0200)]
Added documentation of newly added Binder features (#11845)

4 years agoTest tweaks (#11851)
Anna Koskinen [Fri, 20 Dec 2019 09:18:03 +0000 (11:18 +0200)]
Test tweaks (#11851)

* Test tweaks

Less fixed waiting times when there are ways to check that the operation
has been performed. This will hopefully improve the stability a bit.

* Merge branch 'master' into updateTests20191218

4 years agoImprovements to popup positioning for ComboBox within HorizontalLayout. (#11846)
Anna Koskinen [Wed, 18 Dec 2019 13:18:56 +0000 (15:18 +0200)]
Improvements to popup positioning for ComboBox within HorizontalLayout. (#11846)

Expand ratio and spacing can cause ComboBox to miscalculate its own
position while layouting is still ongoing. Popup should not be
repositioned in such circumstances in order to avoid incorrect
intermediate states.

Continues on #11718

4 years agoChrome updated to 79 (#11847)
Anna Koskinen [Wed, 18 Dec 2019 08:27:50 +0000 (10:27 +0200)]
Chrome updated to 79 (#11847)

4 years agoRelease notes (#11842) 8.10.0.alpha1
Anna Koskinen [Mon, 9 Dec 2019 10:19:46 +0000 (12:19 +0200)]
Release notes (#11842)

4 years agoTest tweaks (#11841)
Anna Koskinen [Fri, 6 Dec 2019 00:49:54 +0000 (02:49 +0200)]
Test tweaks (#11841)

- Use BrowserStack workaround for proper sendKeys functionality on IE11.
- TreeGridBigDetailsManagerTest: allow two pixel discrepancy in expected
scroll position to accommodate IE.
- TreeWideContent: switched from raw type to type inference.
- ValoColorPickerInputFormatsTest: switched equals comparison to correct
way around.
- ResponsiveLayoutUpdateTest: updated screenshots for IE
- ColumnCollapsingAndColumnExpansionTest: updated screenshots for IE
- ClosingWindowWithBrowserFrameShouldntGenerate404Test: test is
incompatible with IE driver, excluded from tested browsers. In manual
testing IE doesn't get 404 in the logs with or without the fix
associated with this test but there are other client-side exceptions
related to focus handling in either case. However, those are out of
scope for this particular fix and should be investigated separately.

4 years agoClose window on ESC, when maximized button is clicked (#11840)
Anastasia Smirnova [Thu, 5 Dec 2019 18:33:31 +0000 (20:33 +0200)]
Close window on ESC, when maximized button is clicked (#11840)

Fixes #11838

Changes:

1. Close a window when maximized button is focused and ESC is pressed
2. Add additional check for a close button to react to the ESC key press
3. Rename a private method `onCloseClick` to `closeWindow` to allow code re-use

4 years agoAdded @since tags, some tweaks to formatting. (#11839)
Anna Koskinen [Wed, 4 Dec 2019 12:38:04 +0000 (14:38 +0200)]
Added @since tags, some tweaks to formatting. (#11839)

4 years agoMake VaadinService.cleanupSession public (#11738)
Knoobie [Tue, 3 Dec 2019 14:20:19 +0000 (15:20 +0100)]
Make VaadinService.cleanupSession public (#11738)

to allow for better integration of third party applications handling the destruction of the session.

Usage example (see https://vaadin.com/directory/component/cleanupservlet-add-on/overview)

"It's possible to close a browser window in such way that neither UI cleanup nor session cleanup will happen until the underlying http session timeouts. This can happen because the design idea for heartbeat is to keep the UI alive, not to ensure timely cleanup, and as such the default check is only performed at the end of each request."

4 years agoSimplify Grid scroll handling. (#11835)
Anna Koskinen [Tue, 3 Dec 2019 11:13:49 +0000 (13:13 +0200)]
Simplify Grid scroll handling. (#11835)

If first attempt at scrolling doesn't succeed it's unlikely that
continuing to wait is going to make any difference. Cache should be
populated before triggering any actions that depend on the row being
visible, otherwise it should be enough to trust that scrollToRow
actually scrolls to row and once scrolling is done the row is as much in
view as it's going to get. This way we don't get into a situation where
Editor never opens because it's still waiting for that one last pixel
that can't be achieved thanks to browser zoom causing rounding errors.

Continues on #11672

4 years agoMake asRequired conditional on binding.setAsRequiredEnabled(..) (#11834)
Tatu Lund [Mon, 2 Dec 2019 09:08:01 +0000 (11:08 +0200)]
Make asRequired conditional on binding.setAsRequiredEnabled(..) (#11834)

It is a very common use case in complex form that whether a field is required or not, it depends on input on other fields. Hypothetical use case sample could be that we have form for a Product and price of the product is needed except in case the Product's type is Sample. So in that kind of scenarios it would be needed to turn off asRequired() validation easily. The purpose of this enhancement and new binding.setAsRequiredEnabled(..) API is to help implementation of this kind of use cases more easily.

https://github.com/vaadin/framework/issues/10709

4 years agoAdd method writeBeanAsDraft(bean) in Binder (#11833)
Tatu Lund [Fri, 29 Nov 2019 12:33:59 +0000 (14:33 +0200)]
Add method writeBeanAsDraft(bean) in Binder (#11833)

* Add method writeBeanAsDraft(bean) in Binder

With current Binder implementation it is not easy to support Forms, which you want to save as draft, i.e. incomplete. For example there can be big text areas, that require time to fill, or lot of fields. Therefore it is needed to that form can be saved, e.g. to other bean in incomplete state when it is not yet passing validation and this other bean can be persisted to draft storage for further editing in the future. This method helps to achieve that easily.

* Add test case for Binder.writeBeanAsDraft(bean)

Bind a field with validator, set value that does not pass validator and save, assert that value was saved.

* Updating test

* Fixing logic flaw in test

* Further improvement of the test case

* Clarification of the JavaDoc

* Fixing typo

* JavaDoc language check

* Fixing whitespace issue

* Fixing whitespaces

* Fixing whitespaces

* Updating JavaDoc

4 years agoDelegate enabled handling to Composite root. (#11832)
Anna Koskinen [Tue, 26 Nov 2019 07:58:26 +0000 (09:58 +0200)]
Delegate enabled handling to Composite root. (#11832)

Otherwise the changed state isn't communicated properly to the
client-side in the initial round trip, as the client-side uses the child
connector's state directly.

Fixes #11831

5 years agoAdd support for excess slashes within static file request path. (#11827)
Anna Koskinen [Fri, 22 Nov 2019 08:24:35 +0000 (10:24 +0200)]
Add support for excess slashes within static file request path. (#11827)

5 years agoFix issue where Chrome refused to select text in Table (#11709) (#11818)
Anna Koskinen [Thu, 21 Nov 2019 19:17:05 +0000 (21:17 +0200)]
Fix issue where Chrome refused to select text in Table (#11709) (#11818)

Manual cherry-pick from Vaadin 7.

5 years agoUpdated local screenshot testing configurations. (#11814)
Anna Koskinen [Thu, 21 Nov 2019 13:33:04 +0000 (15:33 +0200)]
Updated local screenshot testing configurations. (#11814)

* A separate screenshot module hasn't been in use for a while but local
testing configurations and instructions weren't updated to the new model
at the time. Could use some further cleanup but this covers the basics.
* Some tweaks to ScreenshotBrowser to get it functional again, although
the actions for automatically replacing or adding alternative
screenshots still require work and have thus been disabled.

5 years agoDon't attempt to send expand/collapse events for disabled TreeGrid. (#11823)
Anna Koskinen [Thu, 21 Nov 2019 05:43:14 +0000 (07:43 +0200)]
Don't attempt to send expand/collapse events for disabled TreeGrid. (#11823)

The attempt gets blocked later down the line in any case and never
reaches the server, but sending it messes up TreeGrid's internal state.
It gets stuck waiting for the resolution of the blocked call that can
then only be resolved by server-side sending its own expand/collapse
request programmatically. Until that happens no further expand/collapse
attempts will get sent to server even after the TreeGrid has been
enabled again.

Tree is also affected as it is built upon TreeGrid.

Fixes #11822

5 years agoDecode path in getStaticFilePath (#11812)
Tatu Lund [Tue, 19 Nov 2019 12:31:18 +0000 (14:31 +0200)]
Decode path in getStaticFilePath (#11812)

* Decode path in getStaticFilePath

Some containers do not decode path when using getPathInfo, in case path has not been decoded there is a risk for path traversal vulnerability.

5 years agoFixing issue with TwinColSelect not correctly retaining visible selection (#11799)
Tatu Lund [Tue, 19 Nov 2019 09:04:44 +0000 (11:04 +0200)]
Fixing issue with TwinColSelect not correctly retaining visible selection (#11799)

There is a bug in TwinColSelect loging, it retains selection by indexes not by values after being sorted when new item has been added. This is a fixed by changing updateListBox method to retain the selection as it is being called after selection is being done.

Fixes: #11287
5 years agoEliminate un-intuitive NPE (#11802)
Tatu Lund [Fri, 15 Nov 2019 14:04:43 +0000 (16:04 +0200)]
Eliminate un-intuitive NPE (#11802)

* Eliminate un-intuitive NPE

Fixes https://github.com/vaadin/framework/issues/10947

5 years agoCherry picks of Binder fixes in Flow (#11758)
Tatu Lund [Wed, 13 Nov 2019 15:41:52 +0000 (17:41 +0200)]
Cherry picks of Binder fixes in Flow (#11758)

* Cherry picks of Binder fixes in Flow

Addresses: https://github.com/vaadin/framework/issues/9000

Addresses:  https://github.com/vaadin/framework/issues/11109

These changes are adopted from https://github.com/vaadin/flow/pull/4138 and https://github.com/vaadin/flow/pull/6757

5 years agoReduce excess positioning calls for ComboBox popup. (#11808)
Anna Koskinen [Wed, 13 Nov 2019 12:49:36 +0000 (14:49 +0200)]
Reduce excess positioning calls for ComboBox popup. (#11808)

- If an open popup is reset to its default position on every update from
the server before getting adjusted again to the actual expected
position, on heavier applications some of those intermediate positions
might get rendered. If the ComboBox is positioned at the right edge and
the popup contents are longer than the input field (i.e. popup should
open to the left, not right) this might cause flickering.
- Setting the default position is only actually needed when the popup is
opened in order to give it a baseline, otherwise it's better to simply
adjust the position if needed.

Continues on #11718

5 years agoAdded missing constructor with scanNestedDefinitions option (#11801)
Tatu Lund [Tue, 12 Nov 2019 10:27:56 +0000 (12:27 +0200)]
Added missing constructor with scanNestedDefinitions option (#11801)

* Added missing constructor with scanNestedDefinitions option

Addresses https://github.com/vaadin/framework/issues/10949

5 years agoUse APPLICATION_SCOPE for the session lock (#11792)
Tatu Lund [Tue, 12 Nov 2019 07:30:15 +0000 (09:30 +0200)]
Use APPLICATION_SCOPE for the session lock (#11792)

The Vaadin session itself is also stored in APPLICATION_SCOPE. The default
scope is PORTLET_SCOPE, so lock would be otherwise not be in sync with
the session.

To be able to do this, relevant methods in VaadinService are made protected so
that VaadinPortletService can override them.

Fixes #11611

5 years agoFixing issue with Push stopping working in some circumstances (#11791)
Tatu Lund [Tue, 5 Nov 2019 14:16:38 +0000 (16:16 +0200)]
Fixing issue with Push stopping working in some circumstances (#11791)

* Fixing issue with Push stopping working in some circumstances

If new request is attempted when resynchronization is ongoing, the Push will stop working. This patch fixes the issue by aborting handleJson if resynch is already ongoing.

This PR supercedes https://github.com/vaadin/framework/pull/11786

Fixes #11702, #7719

* Call onResynchronize() in MessageHandler

* Optimizing

5 years agoCheck actual Grid selection instead of relying on allSelected flag. (#11787)
Anna Koskinen [Mon, 4 Nov 2019 11:26:32 +0000 (13:26 +0200)]
Check actual Grid selection instead of relying on allSelected flag. (#11787)

The checkbox for selecting all rows only selects all the rows that have
not been filtered out. Changing the filtering does not change the
selection or the checkbox state so assuming that all rows are selected
simply because the checkbox has been checked cannot work.

Fixes #11479

5 years agoRemoved a duplicated word in a note. (#11785)
Anna Koskinen [Mon, 4 Nov 2019 09:10:19 +0000 (11:10 +0200)]
Removed a duplicated word in a note. (#11785)

5 years agoAdded note to setTemplateContents JavaDoc (#11752)
Tatu Lund [Sat, 2 Nov 2019 17:45:22 +0000 (19:45 +0200)]
Added note to setTemplateContents JavaDoc (#11752)

Addresses https://github.com/vaadin/framework/issues/1262

5 years agoFix a timing issue in ComboBox filtering via paste using mouse. (#11780)
Anna Koskinen [Thu, 31 Oct 2019 11:48:17 +0000 (13:48 +0200)]
Fix a timing issue in ComboBox filtering via paste using mouse. (#11780)

The filtering needs to be delayed, otherwise it's performed before the
new filter text is available and the old filter text is used instead.

Fixes #11779

5 years agoSwitch from an assert to logging and return in Grid.onBrowserEvent (#11778)
Anna Koskinen [Wed, 30 Oct 2019 10:26:32 +0000 (12:26 +0200)]
Switch from an assert to logging and return in Grid.onBrowserEvent (#11778)

- If the Grid has frozen columns zooming can cause the regular column
cells to be ever so slightly out of sync with their corresponding rows.
This difference is not noticeable to naked eye but is big enough that
it's possible to hover over the row instead of the cell, which causes an
assertion error and a big ugly error popup. Switching to logging retains
the information delivered by the assertion error for developer purposes
but makes the end user experience smoother.
- Can be tested manually with GridColumnFrozenColumn test UI.

Fixes #11198

5 years agoAdded 1px tolerance to ScrollbarBundle's internal sanity check. (#11777)
Anna Koskinen [Tue, 29 Oct 2019 10:59:27 +0000 (12:59 +0200)]
Added 1px tolerance to ScrollbarBundle's internal sanity check. (#11777)

* Added 1px tolerance to ScrollbarBundle's internal sanity check.

Requiring exact match can cause this check to fail when the browser is
zoomed since rounding is involved. This can in turn block some features
like opening of Grid Editor from working until some more scrolling
happens and the minute inconsistency is fixed.

Can be tested manually using GridEditorUI, depending on the environment
different amounts of zooming may be required for the problem to
manifest.

Fixes #11672

5 years agoImprovements to ScrollDestination sanity checks (#11772)
Anna Koskinen [Mon, 28 Oct 2019 14:32:12 +0000 (16:32 +0200)]
Improvements to ScrollDestination sanity checks (#11772)

- The new top row logical index should always be within the logical
range and high enough up to avoid leaving a gap if possible.
- Added regression testing for using the different scroll destination
types for scrolling to the top and to the bottom by index.

Fixes #11732

5 years agoAdded missing NOTIFICATION_DARK (#11770)
Tatu Lund [Mon, 28 Oct 2019 13:07:41 +0000 (15:07 +0200)]
Added missing NOTIFICATION_DARK (#11770)

And corrected couple of typos

Addresses https://github.com/vaadin/framework/issues/11492

5 years agoFix the end limit of the allowed scrollTo rows. (#11771)
Anna Koskinen [Mon, 28 Oct 2019 11:06:43 +0000 (13:06 +0200)]
Fix the end limit of the allowed scrollTo rows. (#11771)

- Row index counts up from zero, data provider size counts up from one,
as one would expect. If the two match we are already past the available
range.

5 years agoMade JavaDoc of updateSelection more precise (#11768)
Tatu Lund [Mon, 28 Oct 2019 07:52:18 +0000 (09:52 +0200)]
Made JavaDoc of updateSelection more precise (#11768)

Addresses https://github.com/vaadin/framework/issues/11520

5 years agoTweak a test to open Grid details row by clicking cell instead of row. (#11764)
Anna Koskinen [Fri, 25 Oct 2019 07:41:51 +0000 (10:41 +0300)]
Tweak a test to open Grid details row by clicking cell instead of row. (#11764)

5 years agoUpdate chrome version to 78 (#11765)
Zhe Sun [Fri, 25 Oct 2019 06:37:10 +0000 (09:37 +0300)]
Update chrome version to 78 (#11765)

5 years agoWhen ComboBox popup opens to the left accommodate margin/border/padding. (#11755)
Anna Koskinen [Wed, 23 Oct 2019 11:24:19 +0000 (14:24 +0300)]
When ComboBox popup opens to the left accommodate margin/border/padding. (#11755)

Fixes #11718

5 years agoMake sure expanding/collapsing updates expected cache size. (#11753)
Anna Koskinen [Tue, 22 Oct 2019 10:55:27 +0000 (13:55 +0300)]
Make sure expanding/collapsing updates expected cache size. (#11753)

* Make sure expanding/collapsing updates expected cache size.

Fixes #11749

* Merge branch 'master' into issue11749

5 years agoMake cancellation of uploads work regardless of Push configuration (#11743)
Willem Verstraeten [Mon, 21 Oct 2019 17:15:23 +0000 (19:15 +0200)]
Make cancellation of uploads work regardless of Push configuration (#11743)

- Checking the push configuration outside of session lock threw
  an AssertionError, so the push configuration is not checked anymore.

- The original problem with cancelling Upload was due to a subtle
  ordering issue that depended on the Push configuration.
  In the case of PushMode.AUTOMATIC, a new StreamVariable was
  added by the `Upload` component _before_ the `FileUploadHandler`
  got a chance to remove the old `StreamVariable`. As a result, the
  `FileUploadHandler` actually removed the fresh `StreamVariable`,
  breaking future uploads.

Fixes #11682

5 years agoAdd note to setRenderer() JavaDoc about presentation provider (#11751)
Tatu Lund [Mon, 21 Oct 2019 05:37:20 +0000 (08:37 +0300)]
Add note to setRenderer() JavaDoc about presentation provider (#11751)

Addresses https://github.com/vaadin/framework/issues/10277

5 years agoUpload should preserve MIMEType after first selection (#11745)
Anastasia Smirnova [Wed, 16 Oct 2019 09:34:06 +0000 (12:34 +0300)]
Upload should preserve MIMEType after first selection (#11745)

* Upload should preserve MIMEType after first selection

Fix #11698

Automated test is not run locally, need to continue with it

* Remove unused imports

* Add sleep time in testing purposes

* Getting a new instance of an input, after file is downloaded

Exclude IE from tests. Throws https://stackoverflow.com/questions/23883071/unhandled-alert-exception-modal-dialog-present-selenium , but checked manually and it works

5 years agoMake sure Firefox for iOS isn't detected as too old to function. (#11739)
Felix Fontein [Thu, 3 Oct 2019 12:46:33 +0000 (14:46 +0200)]
Make sure Firefox for iOS isn't detected as too old to function. (#11739)

Change-Id: Iea13b958356b0246586bcb7e9969bc26db43bb96

5 years agoCatch and handle IllegalStateException (#11733)
Tatu Lund [Thu, 3 Oct 2019 11:10:13 +0000 (14:10 +0300)]
Catch and handle IllegalStateException (#11733)

* Catch and handle IllegalStateException

Fixes https://github.com/vaadin/framework/issues/11730

* Renaming variables

5 years agoAdded note in JavaDoc of removeColumn (#11725)
Tatu Lund [Thu, 3 Oct 2019 06:38:20 +0000 (09:38 +0300)]
Added note in JavaDoc of removeColumn (#11725)

* Added note in JavaDoc of removeColumn

https://github.com/vaadin/framework/issues/11722

* Merge branch 'master' into fix11722

* Merge branch 'master' into fix11722

5 years agoUpdate context menu addon version (#11735)
Zhe Sun [Wed, 2 Oct 2019 10:09:30 +0000 (13:09 +0300)]
Update context menu addon version (#11735)

5 years agoUpdate Chrome version to 77 (#11727)
Zhe Sun [Tue, 24 Sep 2019 10:05:37 +0000 (13:05 +0300)]
Update Chrome version to 77 (#11727)

* Update Chrome version to 77

* update screenshots

* update screenshots

5 years agoUpdate release note to mention Java 11 support (#11697)
Zhe Sun [Mon, 9 Sep 2019 11:08:01 +0000 (14:08 +0300)]
Update release note to mention Java 11 support (#11697)

* Update release note to mention Java 11 support

* Update explanation about client side code

5 years agoRemoval of data communicator needs to happen before call to super.remove() (#11710)
Tatu Lund [Mon, 9 Sep 2019 07:11:10 +0000 (10:11 +0300)]
Removal of data communicator needs to happen before call to super.remove() (#11710)

Removal of data communicator needs to happen before call to super.remove() since super.remove() sets parent to null causing the NPE.

Fixes https://github.com/vaadin/framework/issues/11617

5 years agoCorrect usage of String.format(..) (#11704)
Tatu Lund [Mon, 9 Sep 2019 06:15:44 +0000 (09:15 +0300)]
Correct usage of String.format(..) (#11704)

Fixes https://github.com/vaadin/framework/issues/11701

5 years agoRemove double negation (#11713)
eriklumme [Fri, 6 Sep 2019 15:08:11 +0000 (18:08 +0300)]
Remove double negation (#11713)

"doesn't not" should be either "doesn't" or "does not".