-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: fixes and optimizes everything regarding event debouncing :-) #17410
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
old component test was fine in CI, but flaky on my workstation, increased debounce timeout to make it more stable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some typos
flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/DomEventFilterIT.java
Outdated
Show resolved
Hide resolved
flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/DomEventFilterIT.java
Outdated
Show resolved
Hide resolved
flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/DomEventFilterIT.java
Outdated
Show resolved
Hide resolved
The overall change looks good, and the tests are more reliable.
|
Note that now the client side seems to throw an exception with "leading only"
flow-server/src/main/java/com/vaadin/flow/dom/DomListenerRegistration.java
Outdated
Show resolved
Hide resolved
…est/ui/DomEventFilterIT.java Co-authored-by: Marco Collovati <marco@vaadin.com>
…est/ui/DomEventFilterIT.java Co-authored-by: Marco Collovati <marco@vaadin.com>
…est/ui/DomEventFilterIT.java Co-authored-by: Marco Collovati <marco@vaadin.com>
Good old console logging... SimpleElementBinderStrategy depended on the implicit leading phase, and caused exceptions to console with only leading event. Didn't harm the functionality but better this way :-)
I don't like this, especially without any real use case, but this way thould be ok to land in x.x.1 release as the behaviour don't change (except dropping some invalid events and extra requests). * configuration with all phases now works at least in trivial cases * improved docs * refactored names to make the code a tiny bit readable
Converted back to draft. After the latest changes, obsolete requests are back or my manual test fails somehow 👎 |
Checked the reference docs. Nothing urgent needs to change there. Of course more hands on examples of everything would be nice. And maybe mentioning that combining all modes is weird and may cause double calls for the same event 🤷♂️ |
@mstahv With this patch I see the same behaviour as previously without it: "g" event is triggered on the server first, and "k" goes after it:
How did you test it? |
Regression in the branch 🤔 Make sure you are not causing another keydown (like shortcut to change focus to IDE) event if you are using the original case in the issue description. I tested the original case with a separate project, but then the changed the implementation still while making the IT test suit more complete 🤷♂️ But it still don't seem to contain test with two different event types. Would have been easier to check two weeks ago 😤 |
Added case to DomEventFilterIT/View locally testing with Safari all seems to work fine, but can't these days be sure as the front-end bundle things are rather complex 🤓 |
…ents happens after timeout
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
The same behaviour was observed because of pre-compiled dev bundle was used, which did not contain these changes. With forcing the frontend build, these changes are now shown and seems to work as expected: one request to server is sent and events go in order. |
Marco is on vacation and seems his comments have been addressed.
This ticket/PR has been released with Vaadin 24.2.0.alpha8 and is also targeting the upcoming stable 24.2.0 version. |
The event order when using debouncing sends events in wrong order. This was tried to be fixed in #14035 but apparently only issues with the core TextField was fixed (or then this was again regressed in the regression fix #15615) --------- Co-authored-by: Marco Collovati <marco@vaadin.com> Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
… (#17516) The event order when using debouncing sends events in wrong order. This was tried to be fixed in #14035 but apparently only issues with the core TextField was fixed (or then this was again regressed in the regression fix #15615) --------- Co-authored-by: Matti Tahvonen <matti@vaadin.com> Co-authored-by: Marco Collovati <marco@vaadin.com> Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Description
The event order when using debouncing sends events in wrong order. This was tried to be fixed in #14035 but apparently only issues with the core TextField was fixed (or then this was again regressed in the regression fix #15615) 🤷♂️
Using this trivial Element API usage like below, type in for example
asdfg
to the input field -> g-event fires before k-event and there are multiple server visits (there should be just one).While investigating the this issue there was also a dozen of other related isseus, incomplete docs and missing integration test.
Type of change
Checklist