From 98d38eb2d2d33c6db4a4091524743ac003a901e9 Mon Sep 17 00:00:00 2001 From: web-padawan Date: Fri, 3 Jan 2025 11:26:20 +0200 Subject: [PATCH] refactor: replace h5 in login error message with strong --- packages/login/src/vaadin-lit-login-form-wrapper.js | 2 +- packages/login/src/vaadin-login-form-wrapper.js | 2 +- .../test/dom/__snapshots__/login-form.test.snap.js | 12 ++++++------ .../theme/lumo/vaadin-login-form-wrapper-styles.js | 2 ++ .../material/vaadin-login-form-wrapper-styles.js | 5 ++++- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/login/src/vaadin-lit-login-form-wrapper.js b/packages/login/src/vaadin-lit-login-form-wrapper.js index 0e5bbffbd8e..3ec2999a6d0 100644 --- a/packages/login/src/vaadin-lit-login-form-wrapper.js +++ b/packages/login/src/vaadin-lit-login-form-wrapper.js @@ -53,7 +53,7 @@ class LoginFormWrapper extends ThemableMixin(PolylitMixin(LitElement)) {

${this.i18n.form.title}

-
${this.i18n.errorMessage.title}
+ ${this.i18n.errorMessage.title}

${this.i18n.errorMessage.message}

diff --git a/packages/login/src/vaadin-login-form-wrapper.js b/packages/login/src/vaadin-login-form-wrapper.js index a02587175d4..99854d815c8 100644 --- a/packages/login/src/vaadin-login-form-wrapper.js +++ b/packages/login/src/vaadin-login-form-wrapper.js @@ -25,7 +25,7 @@ class LoginFormWrapper extends ThemableMixin(PolymerElement) {

[[i18n.form.title]]

-
[[i18n.errorMessage.title]]
+ [[i18n.errorMessage.title]]

[[i18n.errorMessage.message]]

diff --git a/packages/login/test/dom/__snapshots__/login-form.test.snap.js b/packages/login/test/dom/__snapshots__/login-form.test.snap.js index fe48035e254..29c86426262 100644 --- a/packages/login/test/dom/__snapshots__/login-form.test.snap.js +++ b/packages/login/test/dom/__snapshots__/login-form.test.snap.js @@ -580,9 +580,9 @@ snapshots["vaadin-login-form shadow default"] = hidden="" part="error-message" > -
+ Incorrect username or password -
+

Check that you have entered the correct username and password and try again.

@@ -611,9 +611,9 @@ snapshots["vaadin-login-form shadow error"] = Log in
-
+ Incorrect username or password -
+

Check that you have entered the correct username and password and try again.

@@ -645,9 +645,9 @@ snapshots["vaadin-login-form shadow i18n"] = hidden="" part="error-message" > -
+ Väärä käyttäjätunnus tai salasana -
+

Tarkista että käyttäjätunnus ja salasana ovat oikein ja yritä uudestaan.

diff --git a/packages/login/theme/lumo/vaadin-login-form-wrapper-styles.js b/packages/login/theme/lumo/vaadin-login-form-wrapper-styles.js index f7b12df831a..597581eb83b 100644 --- a/packages/login/theme/lumo/vaadin-login-form-wrapper-styles.js +++ b/packages/login/theme/lumo/vaadin-login-form-wrapper-styles.js @@ -65,8 +65,10 @@ const loginFormWrapper = css` } [part='error-message-title'] { + display: block; margin: 0 0 0.25em; color: inherit; + line-height: var(--lumo-line-height-xs); } [part='error-message-description'] { diff --git a/packages/login/theme/material/vaadin-login-form-wrapper-styles.js b/packages/login/theme/material/vaadin-login-form-wrapper-styles.js index 05dd5f531ce..f7abcc21818 100644 --- a/packages/login/theme/material/vaadin-login-form-wrapper-styles.js +++ b/packages/login/theme/material/vaadin-login-form-wrapper-styles.js @@ -78,9 +78,12 @@ const loginFormWrapper = css` margin-right: calc(2.25rem * -0.95); } - [part='error-message'] h5 { + [part='error-message-title'] { + display: block; margin: 0 0 0.25em; color: inherit; + line-height: 1.1; + text-indent: -0.025em; } [part='error-message'] p {