From 30f11f818168c89126777b717ab37829e25e8378 Mon Sep 17 00:00:00 2001 From: Dixsie Wolmers Date: Tue, 10 Nov 2020 16:07:56 -0600 Subject: Align button icons - Fixes button icon and text alignment - App header buttons to be addressed separately - Button documentation will be addressed in separate commit - Aligns form input buttons: datepicker, clear search, and password toggle - Moves title from icon to button for icon only buttons - Aligns validation icon with form input buttons Signed-off-by: Dixsie Wolmers Change-Id: Ie28d7d7dd7303ab6bf1897d1fa569e1580cc2f9d --- src/assets/styles/bmc/custom/_buttons.scss | 38 ++++----- src/assets/styles/bmc/custom/_calendar.scss | 9 +++ src/assets/styles/bmc/custom/_forms.scss | 2 +- src/components/AppNavigation/AppNavigation.vue | 1 + src/components/Global/InfoTooltip.vue | 9 ++- src/components/Global/InputPasswordToggle.vue | 22 +++--- src/components/Global/Search.vue | 16 +--- src/components/Global/TableDateFilter.vue | 92 ++++++++++------------ src/components/Global/TableRowAction.vue | 4 +- src/locales/en-US.json | 2 +- .../SslCertificates/ModalGenerateCsr.vue | 2 +- .../DateTimeSettings/DateTimeSettings.vue | 13 ++- src/views/Configuration/Firmware/Firmware.vue | 2 +- src/views/Control/Kvm/Kvm.vue | 7 -- src/views/Control/Kvm/KvmConsole.vue | 12 +-- .../Control/SerialOverLan/SerialOverLanConsole.vue | 10 +-- .../HardwareStatusTableBmcManager.vue | 4 +- .../HardwareStatus/HardwareStatusTableChassis.vue | 4 +- .../HardwareStatus/HardwareStatusTableDimmSlot.vue | 4 +- .../HardwareStatus/HardwareStatusTableFans.vue | 4 +- .../HardwareStatusTablePowerSupplies.vue | 4 +- .../HardwareStatusTableProcessors.vue | 4 +- .../HardwareStatus/HardwareStatusTableStystem.vue | 4 +- src/views/Overview/OverviewQuickLinks.vue | 4 +- 24 files changed, 130 insertions(+), 143 deletions(-) diff --git a/src/assets/styles/bmc/custom/_buttons.scss b/src/assets/styles/bmc/custom/_buttons.scss index e927d244..2a7b8169 100644 --- a/src/assets/styles/bmc/custom/_buttons.scss +++ b/src/assets/styles/bmc/custom/_buttons.scss @@ -3,11 +3,11 @@ padding-right: $spacer; padding-bottom: $spacer / 2; padding-left: $spacer; - - // Buttons with SVGs and text expect - // text to be wrapped in a span element - svg + span { - margin-left: $spacer / 4; + display: inline-flex; + align-items: center; + justify-content: space-around; + svg { + margin-right: $spacer / 4; } &:disabled { color: gray("600"); @@ -60,21 +60,23 @@ } } -// Datepicker and Password toggle buttons -.input-action { +// Icon only buttons +.btn-icon-only svg { + margin-right: 0; +} + +// Datepicker, clear search and Password toggle buttons +.input-action-btn, +.btn-datepicker { position: absolute; right: 0; + top: 0; + z-index: $zindex-dropdown + 1; } -.input-action .btn-link, + +// Contain input buttons within input +.btn-datepicker .dropdown-toggle, .input-action-btn { - position: absolute; - right: 1px; - top: 1px; - z-index: $zindex-dropdown + 1; - padding: 0; - width: 36px; - height: 35.8px; - svg { - vertical-align: sub; - } + padding: 7px; + margin: 1px; } \ No newline at end of file diff --git a/src/assets/styles/bmc/custom/_calendar.scss b/src/assets/styles/bmc/custom/_calendar.scss index 641e4ed1..0307a6ce 100644 --- a/src/assets/styles/bmc/custom/_calendar.scss +++ b/src/assets/styles/bmc/custom/_calendar.scss @@ -5,4 +5,13 @@ color: theme-color("dark"); } } +} + +.b-calendar-grid .btn { + display: inline-block; +} + +// Date picker focus +.b-calendar .b-calendar-grid { + padding: 6px 12px; } \ No newline at end of file diff --git a/src/assets/styles/bmc/custom/_forms.scss b/src/assets/styles/bmc/custom/_forms.scss index 464282c6..0451474b 100644 --- a/src/assets/styles/bmc/custom/_forms.scss +++ b/src/assets/styles/bmc/custom/_forms.scss @@ -127,6 +127,6 @@ .form-control-with-button { &.is-invalid, &.is-valid { - background-position: right 3rem bottom 50%; + background-position: right 2.5rem bottom 50%; } } diff --git a/src/components/AppNavigation/AppNavigation.vue b/src/components/AppNavigation/AppNavigation.vue index fb50f5ec..6e893a33 100644 --- a/src/components/AppNavigation/AppNavigation.vue +++ b/src/components/AppNavigation/AppNavigation.vue @@ -124,6 +124,7 @@ svg { } .btn-link { + display: inline-block; width: 100%; text-align: left; text-decoration: none !important; diff --git a/src/components/Global/InfoTooltip.vue b/src/components/Global/InfoTooltip.vue index f3cb7f12..5d604503 100644 --- a/src/components/Global/InfoTooltip.vue +++ b/src/components/Global/InfoTooltip.vue @@ -1,6 +1,11 @@ diff --git a/src/components/Global/InputPasswordToggle.vue b/src/components/Global/InputPasswordToggle.vue index bf3e4ca5..2119f8c6 100644 --- a/src/components/Global/InputPasswordToggle.vue +++ b/src/components/Global/InputPasswordToggle.vue @@ -2,22 +2,15 @@
-
@@ -32,6 +25,7 @@ export default { data() { return { isVisible: false, + togglePasswordLabel: this.$t('global.ariaLabel.showPassword'), }; }, methods: { @@ -44,6 +38,10 @@ export default { if (inputEl.nodeName === 'INPUT') { inputEl.type = this.isVisible ? 'text' : 'password'; } + + this.isVisible + ? (this.togglePasswordLabel = this.$t('global.ariaLabel.hidePassword')) + : (this.togglePasswordLabel = this.$t('global.ariaLabel.showPassword')); }, }, }; diff --git a/src/components/Global/Search.vue b/src/components/Global/Search.vue index c259df91..d472c0c9 100644 --- a/src/components/Global/Search.vue +++ b/src/components/Global/Search.vue @@ -23,10 +23,12 @@ - + @@ -77,16 +79,4 @@ export default { z-index: 4; stroke: gray('400'); } - -.btn { - position: absolute; - right: 0; - top: 0; - padding: 0.4rem 1rem; - z-index: 4; - svg { - margin-left: 0; - vertical-align: sub; - } -} diff --git a/src/components/Global/TableDateFilter.vue b/src/components/Global/TableDateFilter.vue index 73b2b832..00c04ab0 100644 --- a/src/components/Global/TableDateFilter.vue +++ b/src/components/Global/TableDateFilter.vue @@ -23,32 +23,26 @@ {{ $t('global.form.dateMustBeBefore', { date: toDate }) }} - + + + - + + + diff --git a/src/components/Global/TableRowAction.vue b/src/components/Global/TableRowAction.vue index a12ae801..94ef6ce4 100644 --- a/src/components/Global/TableRowAction.vue +++ b/src/components/Global/TableRowAction.vue @@ -2,7 +2,7 @@ diff --git a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue index 79cdbc1e..d1d04539 100644 --- a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue +++ b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue @@ -73,25 +73,22 @@ diff --git a/src/views/Configuration/Firmware/Firmware.vue b/src/views/Configuration/Firmware/Firmware.vue index 7e9599fe..24ef33c8 100644 --- a/src/views/Configuration/Firmware/Firmware.vue +++ b/src/views/Configuration/Firmware/Firmware.vue @@ -367,7 +367,7 @@ export default { } } .card-footer { - height: 41px; + height: 40px; } .card-body { padding: 0.75rem 1.25rem; diff --git a/src/views/Control/Kvm/Kvm.vue b/src/views/Control/Kvm/Kvm.vue index 10322bde..1a41baaf 100644 --- a/src/views/Control/Kvm/Kvm.vue +++ b/src/views/Control/Kvm/Kvm.vue @@ -18,13 +18,6 @@ export default {