Skip to content

refactor: cleanup no longer needed login-form code - #4888

Merged
web-padawan merged 2 commits into
masterfrom
refactor/login-form-cleanup
Nov 3, 2022
Merged

web-padawan merged 2 commits into
masterfrom
refactor/login-form-cleanup

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Removed some code that was needed for older browsers, including event.keyCode and iOS workaround.
Also fixed duplicate line for error-message-description container in the stylable parts table.

Type of change

  • Refactor

/** @protected */
connectedCallback() {
super.connectedCallback();
this._handleInputKeydown = this._handleInputKeydown.bind(this);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to bind this listener, because it's used in a template and Polymer handles that.


/** @private */
__isValid(input) {
return (input.validate && input.validate()) || (input.checkValidity && input.checkValidity());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified this logic, as both vaadin-text-field and vaadin-password-field support validate().

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Comment on lines -63 to -67
action="{{action}}"
disabled="{{disabled}}"
error="{{error}}"
no-forgot-password="{{noForgotPassword}}"
i18n="{{i18n}}"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to bind action and disabled because the form wrapper doesn't use both properties.
Changed others to use one-way data binding, as they aren't changed in the form wrapper.

@vaadin-bot

Copy link
Copy Markdown
Collaborator

Hi @web-padawan , this commit cannot be picked to 22.0 by this bot, can you take a look and pick it manually?
Error Message: Error: Command failed: git cherry-pick 5d8c783
error: could not apply 5d8c783... refactor: cleanup no longer needed login-form code (#4888)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

web-padawan added a commit that referenced this pull request Nov 3, 2022
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Nov 3, 2022
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Nov 3, 2022
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
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.

3 participants