Skip to content
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

feat: enable components to notify binder when validation state changes #13940

Merged
merged 21 commits into from Jun 16, 2022

Conversation

taefi
Copy link
Contributor

@taefi taefi commented Jun 9, 2022

Description

Adds the needed API to notify Binder about validation status changes that happen in field components.

Fixes #8242
Related to vaadin/flow-components#1158

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

Unit Test Results

   974 files  +  1     974 suites  +1   48m 57s ⏱️ + 2m 56s
6 320 tests +  8  6 272 ✔️ +8  48 💤 ±0  0 ±0 
6 548 runs  +12  6 494 ✔️ +9  54 💤 +3  0 ±0 

Results for commit e60de2a. ± Comparison against base commit 7024ad3.

♻️ This comment has been updated with latest results.

@TatuLund TatuLund marked this pull request as ready for review June 9, 2022 17:04
@taefi taefi added +0.1.0 and removed +1.0.0 labels Jun 10, 2022
@mshabarov mshabarov self-requested a review June 13, 2022 05:57
@vaadin-bot vaadin-bot added +1.0.0 and removed +0.1.0 labels Jun 13, 2022
When the number of tests grows the timeout also should be increased.
@taefi taefi requested a review from mshabarov June 15, 2022 18:33
vaadin-bot pushed a commit that referenced this pull request Jun 16, 2022
#13940)

* feat: enable components to notify binder about their validation status changes

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot pushed a commit that referenced this pull request Jun 16, 2022
#13940)

* feat: enable components to notify binder about their validation status changes

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot pushed a commit that referenced this pull request Jun 16, 2022
#13940)

* feat: enable components to notify binder about their validation status changes

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
vaadin-bot pushed a commit that referenced this pull request Jun 16, 2022
#13940)

* feat: enable components to notify binder about their validation status changes

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
mshabarov added a commit that referenced this pull request Jun 16, 2022
#13940) (#13994)

* feat: enable components to notify binder about their validation status changes

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>

Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
mshabarov pushed a commit that referenced this pull request Jun 17, 2022
#13940) (CP: 23.1) (#13993)

Adds the needed API to notify Binder about validation status changes that happen in field components.

Fixes #8242
Related to vaadin/flow-components#1158
taefi pushed a commit that referenced this pull request Jun 20, 2022
#13940) (CP: 9.0) (#13996)

* feat: enable components to notify binder when validation state changes (#13940)
 
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
taefi pushed a commit that referenced this pull request Jun 20, 2022
#13940) (CP: 2.8) (#13995)

* feat: enable components to notify binder when validation state changes (#13940)

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
taefi pushed a commit that referenced this pull request Jun 20, 2022
#13940) (CP: 2.7) (#13997)

* feat: enable components to notify binder when validation state changes (#13940)

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
@knoobie
Copy link
Contributor

knoobie commented Jul 5, 2022

@mshabarov I would like to work on a solution to deactivate this feature; I was wondering if you guys would prefer it on Binder-level or Binding-level.

This could later be enhanced from private boolean enableFieldValidation = false / true as default to private boolean enableFieldValidation = FeatureFlags.get(BINDER_FIELD_VALIDATION); if you guys wanna put it behind a feature flag and swap the default value later on.

taefi pushed a commit that referenced this pull request Jul 21, 2022
…on binder

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)
vaadin-bot pushed a commit that referenced this pull request Jul 21, 2022
…on binder

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)
vaadin-bot pushed a commit that referenced this pull request Jul 21, 2022
…on binder

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)
vaadin-bot pushed a commit that referenced this pull request Jul 21, 2022
…on binder

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)
mcollovati pushed a commit that referenced this pull request Jul 21, 2022
…on binder (#14198)

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)

Co-authored-by: Knoobie <Knoobie@gmx.de>
mcollovati pushed a commit that referenced this pull request Jul 21, 2022
…on binder (#14197)

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)

Co-authored-by: Knoobie <Knoobie@gmx.de>
mcollovati added a commit that referenced this pull request Jul 21, 2022
…on binder (#14158) (CP: 9.0) (#14199)

Add binder-level flag to allow disabling of 
validation status change listener registration 
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)

Co-authored-by: Knoobie <Knoobie@gmx.de>
Co-authored-by: Marco Collovati <marco@vaadin.com>
taefi pushed a commit that referenced this pull request Jul 22, 2022
…on binder

Add binder-level flag to allow disabling of
validation status change listener registration
for HasValidator fields.

Related to #13940 (comment) and #13940 (comment)

(cherry picked from commit 420498c)
taefi added a commit that referenced this pull request Jul 22, 2022
…on binder (#14205)

Add binder-level flag to allow disabling of
validation status change listener registration
for HasValidator fields.

Related to #13940 (comment) and vaadin/flow-components#3406 (comment)

(cherry picked from commit 420498c)

Co-authored-by: Knoobie <knoobie@gmx.de>
vaadin-bot pushed a commit that referenced this pull request Jul 22, 2022
…on binder (#14205)

Add binder-level flag to allow disabling of
validation status change listener registration
for HasValidator fields.

Related to #13940 (comment) and vaadin/flow-components#3406 (comment)

(cherry picked from commit 420498c)

Co-authored-by: Knoobie <knoobie@gmx.de>
mcollovati pushed a commit that referenced this pull request Jul 25, 2022
…on binder (#14205) (#14208)

Add binder-level flag to allow disabling of
validation status change listener registration
for HasValidator fields.

Related to #13940 (comment) and vaadin/flow-components#3406 (comment)

(cherry picked from commit 420498c)

Co-authored-by: Knoobie <knoobie@gmx.de>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Binder should always validate after field's internal validation
4 participants