aurelia / validation

A validation plugin for Aurelia.
MIT License
132 stars 128 forks source link

feat: focusout trigger + changeOrX behavior change #544

Closed Sayan751 closed 4 years ago

Sayan751 commented 4 years ago

BREAKING CHANGE: This commit changes the default behavior for the changeOrBlur trigger.

Additionally, this commit also adds 2 new validateTriggers namely focusout, and changeOrFocusout and respective binding behaviors. As it is quite evident from the name the triggers are based on focusout DOM event. The difference between blur and focusout is that the later bubbles. It is useful for custom elements, containing input elements. The changeOrFocusout is similar in nature of changeOrBlur, as described above. This closes #543.

Sayan751 commented 4 years ago

@bigopon check this repo to play with the changes https://github.com/Sayan751/new-validation-ux-demo-pr-544

bigopon commented 4 years ago

@EisenbergEffect @Sayan751 Maybe there's some details that I miss but this looks good to me. Maybe you need to reverse the dist file as they are processed as part of the release @Sayan751

bigopon commented 4 years ago

I'm not sure why the CI failed but my local builds just fine 🤔

Sayan751 commented 4 years ago

@bigopon @EisenbergEffect reverted the dist.

The CI is failing probably due to the type definition generated + old TS version. The build is also failing in master.

bigopon commented 4 years ago

@Sayan751 nice work! lgtm 🎉

EisenbergEffect commented 4 years ago

@Sayan751 Anything else needed or is this ready for merge?

Sayan751 commented 4 years ago

@EisenbergEffect I have nothing else to push in this PR. This is ready for merge.

bigopon commented 4 years ago

Thanks @Sayan751 awesome work. You've got magic hands with our plugins 😁

Sayan751 commented 4 years ago

@bigopon Very kind words 😊 Wouldn't have been same without the help from everyone involved though, including code review, community discussions etc. Oh boy! That sounds like a speech after winning academy awards. 😛

I want to see this getting used by devs, to understand if this new behavior suits most of them. Reason being that this is a delicate but breaking change.