From 15b06e85058cc013fed9670dff2129b8f894a00f Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Wed, 7 Feb 2024 16:08:41 -0500 Subject: [PATCH] [ui] HashiCorp Design System upgraded to 3.6.0 (#19872) * HashiCorp Design System upgraded to 3.6.0 * Fresh yarn * Responses out of range are brought back within * General pass at a11y fixes with updated components and node * Further tooltip updates * 3 more partitions worth of toggle and tooltip updates * scale-events-accordion and topo-viz node fixes --- ui/app/components/conditional-link-to.hbs | 31 +- ui/app/components/das/recommendation-card.hbs | 64 +- ui/app/components/das/task-row.hbs | 35 +- .../job-status/individual-allocation.hbs | 59 +- .../components/keyboard-shortcuts-modal.hbs | 16 +- ui/app/styles/core/table.scss | 12 + .../allocations/allocation/index.hbs | 6 +- ui/app/templates/clients/client/index.hbs | 27 +- ui/app/templates/clients/index.hbs | 2 +- .../job-deployment/deployment-allocations.hbs | 2 +- .../components/job-editor/review.hbs | 2 +- .../job-page/parts/recent-allocations.hbs | 2 +- .../components/multi-select-dropdown.hbs | 1 + .../components/scale-events-accordion.hbs | 14 +- ui/app/templates/components/task-row.hbs | 10 +- ui/app/templates/components/topo-viz/node.hbs | 42 +- .../csi/plugins/plugin/allocations.hbs | 2 +- ui/app/templates/csi/plugins/plugin/index.hbs | 4 +- ui/app/templates/csi/volumes/volume.hbs | 4 +- ui/app/templates/jobs/job/allocations.hbs | 2 +- ui/app/templates/jobs/job/task-group.hbs | 2 +- ui/package.json | 2 +- ui/tests/acceptance/behaviors/fs.js | 4 +- .../components/scale-events-accordion-test.js | 16 +- .../components/service-status-bar-test.js | 3 +- .../components/topo-viz/node-test.js | 4 +- ui/tests/pages/components/topo-viz/node.js | 2 +- ui/yarn.lock | 11433 +++++----------- 28 files changed, 3983 insertions(+), 7820 deletions(-) diff --git a/ui/app/components/conditional-link-to.hbs b/ui/app/components/conditional-link-to.hbs index 9b526ce8b..4dd2be12f 100644 --- a/ui/app/components/conditional-link-to.hbs +++ b/ui/app/components/conditional-link-to.hbs @@ -4,11 +4,30 @@ ~}} {{#if @condition}} - - {{yield}} - + {{#if @tooltip}} + + {{yield}} + + {{else}} + + {{yield}} + + {{/if}} {{else}} - - {{yield}} - + {{#if @tooltip}} + + + {{yield}} + + + {{else}} + + {{yield}} + + {{/if}} {{/if}} \ No newline at end of file diff --git a/ui/app/components/das/recommendation-card.hbs b/ui/app/components/das/recommendation-card.hbs index 3d3e47edd..a9360f633 100644 --- a/ui/app/components/das/recommendation-card.hbs +++ b/ui/app/components/das/recommendation-card.hbs @@ -60,38 +60,42 @@ Task Toggle All - -
CPU
-
+ - -
Mem
-
+ {{else}} Task diff --git a/ui/app/components/das/task-row.hbs b/ui/app/components/das/task-row.hbs index 760112831..ab8f7a784 100644 --- a/ui/app/components/das/task-row.hbs +++ b/ui/app/components/das/task-row.hbs @@ -11,23 +11,28 @@ > {{@task.name}} - + - - + {{#if (and @active this.height)}} diff --git a/ui/app/components/job-status/individual-allocation.hbs b/ui/app/components/job-status/individual-allocation.hbs index fe2a8348a..a78f680b8 100644 --- a/ui/app/components/job-status/individual-allocation.hbs +++ b/ui/app/components/job-status/individual-allocation.hbs @@ -2,33 +2,34 @@ Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: BUSL-1.1 ~}} - - - {{#unless @steady}} - {{#if (eq @canary "canary")}} - - {{/if}} - {{#if (eq @status "running")}} - - {{#if (eq @health "healthy")}} - - {{else if (eq @health "unhealthy")}} - - {{else}} - - {{/if}} - - {{/if}} - {{/unless}} - - \ No newline at end of file + {{#unless @steady}} + {{#if (eq @canary "canary")}} + + {{/if}} + {{#if (eq @status "running")}} + + {{#if (eq @health "healthy")}} + + {{else if (eq @health "unhealthy")}} + + {{else}} + + {{/if}} + + {{/if}} + {{/unless}} + diff --git a/ui/app/components/keyboard-shortcuts-modal.hbs b/ui/app/components/keyboard-shortcuts-modal.hbs index ddacda683..46c5c61be 100644 --- a/ui/app/components/keyboard-shortcuts-modal.hbs +++ b/ui/app/components/keyboard-shortcuts-modal.hbs @@ -46,13 +46,15 @@ {{/each}}
- Keyboard shortcuts {{#if this.keyboard.enabled}}enabled{{else}}disabled{{/if}} - + + Keyboard shortcuts {{#if this.keyboard.enabled}}enabled{{else}}disabled{{/if}} +
{{/if}} diff --git a/ui/app/styles/core/table.scss b/ui/app/styles/core/table.scss index 4af22275c..b98f82cc3 100644 --- a/ui/app/styles/core/table.scss +++ b/ui/app/styles/core/table.scss @@ -136,6 +136,18 @@ max-width: 200px; } + .visually-hidden { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + white-space: nowrap; /* added to ensure the text does not wrap */ + } + @for $i from 1 through 11 { &.is-#{$i} { width: math.div(100%, 12) * $i; diff --git a/ui/app/templates/allocations/allocation/index.hbs b/ui/app/templates/allocations/allocation/index.hbs index 73f9524bc..3d9307ed7 100644 --- a/ui/app/templates/allocations/allocation/index.hbs +++ b/ui/app/templates/allocations/allocation/index.hbs @@ -188,7 +188,7 @@ @class="is-striped" as |t| > - + Driver Health Name @@ -287,7 +287,7 @@
- + Service Type Name @@ -468,7 +468,7 @@ @class="allocations is-isolated" as |t| > - + Driver Health, Scheduling, and Preemption ID diff --git a/ui/app/templates/clients/client/index.hbs b/ui/app/templates/clients/client/index.hbs index e624b372c..8958cca16 100644 --- a/ui/app/templates/clients/client/index.hbs +++ b/ui/app/templates/clients/client/index.hbs @@ -180,13 +180,14 @@ > Eligible - - {{x-icon "info-circle-outline" class="is-faded"}} - + + +
Host Resource Utilization - - {{x-icon "info-circle-outline" class="is-faded"}} - + + +
@@ -536,7 +539,7 @@ @class="with-foot {{if this.showSubTasks "with-collapsed-borders"}}" as |t| > - + Driver Health, Scheduling, and Preemption ID diff --git a/ui/app/templates/clients/index.hbs b/ui/app/templates/clients/index.hbs index 5394ff2af..cb30abbd9 100644 --- a/ui/app/templates/clients/index.hbs +++ b/ui/app/templates/clients/index.hbs @@ -218,7 +218,7 @@ as |t| > - + Driver Health ID - + Driver Health, Scheduling, and Preemption ID Task Group Created diff --git a/ui/app/templates/components/job-editor/review.hbs b/ui/app/templates/components/job-editor/review.hbs index 4d4615a83..3bce17971 100644 --- a/ui/app/templates/components/job-editor/review.hbs +++ b/ui/app/templates/components/job-editor/review.hbs @@ -56,7 +56,7 @@ as |t| > - + Driver Health, Scheduling, and Preemption ID Task Group Created diff --git a/ui/app/templates/components/job-page/parts/recent-allocations.hbs b/ui/app/templates/components/job-page/parts/recent-allocations.hbs index 54a6f5a65..de081c77a 100644 --- a/ui/app/templates/components/job-page/parts/recent-allocations.hbs +++ b/ui/app/templates/components/job-page/parts/recent-allocations.hbs @@ -26,7 +26,7 @@ @class="with-foot {{if this.showSubTasks "with-collapsed-borders"}}" as |t| > - + Driver Health, Scheduling, and Preemption ID diff --git a/ui/app/templates/components/multi-select-dropdown.hbs b/ui/app/templates/components/multi-select-dropdown.hbs index 89e17f285..50b99d47b 100644 --- a/ui/app/templates/components/multi-select-dropdown.hbs +++ b/ui/app/templates/components/multi-select-dropdown.hbs @@ -39,6 +39,7 @@ class="dropdown-option" tabindex="0" onkeyup={{action "traverseList" option}} + role="group" >