From a6727210b5a9ae42a80b51793b00c57ee8983611 Mon Sep 17 00:00:00 2001 From: Uliana Caceres <2720077+UlianaMunich@users.noreply.github.com> Date: Wed, 28 Apr 2021 14:17:23 +0200 Subject: [PATCH] Update user settings dialog HTML layout (#1895) --- core/fundamentalStyleClasses.js | 3 +- core/package.json | 2 +- core/src/UserSettingsDialog.html | 3 + core/src/UserSettingsEditor.html | 315 ++++++++---------- .../1-angular/user_settings_dialog.spec.js | 3 +- 5 files changed, 150 insertions(+), 176 deletions(-) diff --git a/core/fundamentalStyleClasses.js b/core/fundamentalStyleClasses.js index 9dcbf876d7..a003230c73 100644 --- a/core/fundamentalStyleClasses.js +++ b/core/fundamentalStyleClasses.js @@ -22,11 +22,12 @@ module.exports = [ './node_modules/fundamental-styles/dist/form-label.css', //'./node_modules/fundamental-styles/dist/form-message.css', //'./node_modules/fundamental-styles/dist/form-select.css', + './node_modules/fundamental-styles/dist/form-layout-grid.css', //'./node_modules/fundamental-styles/dist/inline-help.css', './node_modules/fundamental-styles/dist/input.css', './node_modules/fundamental-styles/dist/input-group.css', //'./node_modules/fundamental-styles/dist/info-label.css', - //'./node_modules/fundamental-styles/dist/layout-grid.css', + './node_modules/fundamental-styles/dist/layout-grid.css', //'./node_modules/fundamental-styles/dist/layout-panel.css', './node_modules/fundamental-styles/dist/link.css', './node_modules/fundamental-styles/dist/list.css', diff --git a/core/package.json b/core/package.json index 7896060ba7..6c102a9dee 100644 --- a/core/package.json +++ b/core/package.json @@ -77,7 +77,7 @@ }, { "path": "./public/luigi.css", - "maxSize": "461 kB", + "maxSize": "528 kB", "compression": "none" }, { diff --git a/core/src/UserSettingsDialog.html b/core/src/UserSettingsDialog.html index 29975a4bfe..1b05d8827f 100644 --- a/core/src/UserSettingsDialog.html +++ b/core/src/UserSettingsDialog.html @@ -468,6 +468,7 @@ .fd-list__item { cursor: pointer; } + .fd-list__item.is-selected, .fd-list__item[aria-selected='true'] { background: #e5f0fa; @@ -476,11 +477,13 @@ border-bottom: var(--sapList_BorderWidth, 0.0625rem) solid var(--sapList_SelectionBorderColor, #0854a0); } + .fd-list__item.is-hover, .fd-list__item:hover { background: #f5f5f5; background: var(--sapList_Hover_Background, #f5f5f5); } + .fd-list__item.is-selected:hover { background: var(--sapList_Hover_SelectionBackground, #d8e9f8); } diff --git a/core/src/UserSettingsEditor.html b/core/src/UserSettingsEditor.html index 04edfb15d5..9eaedf5a49 100644 --- a/core/src/UserSettingsEditor.html +++ b/core/src/UserSettingsEditor.html @@ -81,203 +81,172 @@
{#if userSettingGroup && userSettingGroup[0] && userSettingGroup[1]} {#if userSettingGroup[1].settings}
-
+
{#each Object.entries(userSettingGroup[1].settings) as [key, schemaItem], i} -
- -
-
- {#if schemaItem.type==='string'} {#if schemaItem.isEditable || - schemaItem.isEditable === undefined} - - {:else} - - {/if} {/if} {#if schemaItem.type==='enum' && (schemaItem.style === undefined || - schemaItem.style === 'list')} -
-
- +
+
+ {/if} {#if schemaItem.type==='enum' && schemaItem.style === 'button' && + Array.isArray(schemaItem.options)} +
-
- {/if} {#if schemaItem.type==='enum' && schemaItem.style === 'button' && - Array.isArray(schemaItem.options)} -
-
- {#each schemaItem.options as option, optionIndex} - - {/each} -
-
- {/if} {#if schemaItem.type==='boolean' && (!schemaItem.style || schemaItem.style - === 'switch')} -
{/each}
diff --git a/test/e2e-test-application/e2e/tests/1-angular/user_settings_dialog.spec.js b/test/e2e-test-application/e2e/tests/1-angular/user_settings_dialog.spec.js index d72f9a688f..6ef70a26f0 100644 --- a/test/e2e-test-application/e2e/tests/1-angular/user_settings_dialog.spec.js +++ b/test/e2e-test-application/e2e/tests/1-angular/user_settings_dialog.spec.js @@ -71,7 +71,8 @@ describe('Navigation', () => { //Email Input field should be disabled and a usual text cy.get('[data-testid="lui-us-input1"]') .should('exist') - .should('have.class', 'lui-form-text'); + .should('have.class', 'fd-form-label') + .should('have.attr', 'disabled'); cy.get('[data-testid="lui-us-label-switch_checkbox"]') .should('exist')