From 1cd5c978a2678323e89454a5ef607b470ac2b1bc Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Fri, 10 Jan 2025 17:12:31 -0800 Subject: [PATCH 01/10] Update extensions/vscode/src/views/deployProgress.ts Co-authored-by: Jordan Jensen --- extensions/vscode/src/views/deployProgress.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/src/views/deployProgress.ts b/extensions/vscode/src/views/deployProgress.ts index 33e3ce071..cabe4a681 100644 --- a/extensions/vscode/src/views/deployProgress.ts +++ b/extensions/vscode/src/views/deployProgress.ts @@ -65,7 +65,7 @@ export function deployProject( "deployProject, token.onCancellationRequested", error, ); - window.showInformationMessage( + window.showErrorMessage( `Unable to abort deployment: ${summary}`, ); } From fd4658503b9609be17e572f36749b5261a5c1b7f Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Mon, 13 Jan 2025 11:25:40 -0800 Subject: [PATCH 02/10] PR requested changes --- .../src/api/resources/ContentRecords.ts | 3 +- .../src/components/EvenEasierDeploy.vue | 96 +++++++++---------- 2 files changed, 47 insertions(+), 52 deletions(-) diff --git a/extensions/vscode/src/api/resources/ContentRecords.ts b/extensions/vscode/src/api/resources/ContentRecords.ts index 0befd6e27..09e2ab536 100644 --- a/extensions/vscode/src/api/resources/ContentRecords.ts +++ b/extensions/vscode/src/api/resources/ContentRecords.ts @@ -152,8 +152,9 @@ export class ContentRecords { // 500 - internal server error cancelDeployment(deploymentName: string, dir: string, localId: string) { const encodedName = encodeURIComponent(deploymentName); + const encodedLocalId = encodeURIComponent(localId); return this.client.post( - `deployments/${encodedName}/cancel/${localId}`, + `deployments/${encodedName}/cancel/${encodedLocalId}`, {}, { params: { diff --git a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue index 053b97483..432fae5b1 100644 --- a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue +++ b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue @@ -163,56 +163,52 @@ :context-menu="contextMenuVSCodeContext" /> -
- Is this already deployed to a Connect server? You can - update that previous deployment. -
-
- This deployment - will be updated when deployed. -
-
- {{ formatDateString(home.selectedContentRecord.deployedAt) }} -
-
+
{{ formatDateString(home.selectedContentRecord.abortedAt) }}
-
- - -
-
- +
+ Is this already deployed to a Connect server? You can + update that previous deployment. +
+
+ This deployment + will be updated when deployed. +
+
- {{ deployedContentButtonLabel }} - + {{ formatDateString(home.selectedContentRecord.deployedAt) }} +
+
+ + +
+
+ + {{ deployedContentButtonLabel }} + +
@@ -414,16 +410,14 @@ const lastStatusDescription = computed(() => { const isPreContentRecordWithID = computed(() => { return ( isPreContentRecord(home.selectedContentRecord) && - Boolean(home.selectedContentRecord.id) && - !isAbortedContentRecord.value + Boolean(home.selectedContentRecord.id) ); }); const isPreContentRecordWithoutID = computed(() => { return ( isPreContentRecord(home.selectedContentRecord) && - !isPreContentRecordWithID.value && - !isAbortedContentRecord.value + !isPreContentRecordWithID.value ); }); From 6b8dc62e04a70179160babf8e096ecbe87b39622 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Mon, 13 Jan 2025 12:06:21 -0800 Subject: [PATCH 03/10] Add warning and error colors to style --- extensions/vscode/webviews/homeView/src/style.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/extensions/vscode/webviews/homeView/src/style.css b/extensions/vscode/webviews/homeView/src/style.css index 41c09be43..bd418c81d 100644 --- a/extensions/vscode/webviews/homeView/src/style.css +++ b/extensions/vscode/webviews/homeView/src/style.css @@ -50,10 +50,22 @@ body { color: var(--vscode-sideBarSectionHeader-foreground); } +.text-warning { + color: var(--vscode-list-warningForeground); +} + +.border-warning { + border-color: var(--vscode-list-warningForeground); +} + .text-error { color: var(--vscode-list-errorForeground); } +.border-error { + border-color: var(--vscode-list-errorForeground); +} + .text-git-added { color: var(--vscode-gitDecoration-addedResourceForeground); } From 070276d6163388f39736a3893ac55b3eb6790b0d Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Mon, 13 Jan 2025 12:06:34 -0800 Subject: [PATCH 04/10] Re-design last deployment alert --- .../src/components/EvenEasierDeploy.vue | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue index df533a336..6bdff46dc 100644 --- a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue +++ b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue @@ -185,7 +185,9 @@ v-if="home.selectedContentRecord.deploymentError" class="last-deployment-details last-deployment-error" > - +
+ +
{ } .last-deployment-error { - border: solid 2px; - border-color: gray; - padding: 5px; display: flex; - align-items: center; + align-items: stretch; + + .alert-border { + display: flex; + align-items: center; + border-right-width: 1px; + border-right-style: solid; + padding-right: 5px; + margin-right: 5px; + } } .error-icon { @@ -621,7 +629,6 @@ const viewContent = () => { .error-message { min-width: 0; word-wrap: break-word; - margin-left: 5px; } .progress-container { From 186d39383879bc161fca194908a6d16376c9b784 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Mon, 13 Jan 2025 17:05:00 -0800 Subject: [PATCH 05/10] Improve optical balance of alerts --- .../webviews/homeView/src/components/EvenEasierDeploy.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue index 6bdff46dc..c75218190 100644 --- a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue +++ b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue @@ -618,7 +618,7 @@ const viewContent = () => { border-right-width: 1px; border-right-style: solid; padding-right: 5px; - margin-right: 5px; + margin-right: 7px; } } From 3d41c963a5af480958f245f8034f21c11b5e8785 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Mon, 13 Jan 2025 17:08:17 -0800 Subject: [PATCH 06/10] Lower vite test coverage thresholds --- extensions/vscode/webviews/homeView/vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/webviews/homeView/vite.config.ts b/extensions/vscode/webviews/homeView/vite.config.ts index 54c4dceb3..313cd65b3 100644 --- a/extensions/vscode/webviews/homeView/vite.config.ts +++ b/extensions/vscode/webviews/homeView/vite.config.ts @@ -41,9 +41,9 @@ export default defineConfig({ enabled: true, thresholds: { functions: 30.13, - lines: 17.48, + lines: 17.46, branches: 44.82, - statements: 17.48, + statements: 17.46, autoUpdate: true, }, }, From 1ebf6eca7eb4f3d4a4257bea58e2d0b7c7058a60 Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Mon, 13 Jan 2025 17:08:24 -0800 Subject: [PATCH 07/10] re-use same style for date/times --- .../homeView/src/components/EvenEasierDeploy.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue index 432fae5b1..3463ae6f7 100644 --- a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue +++ b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue @@ -163,7 +163,7 @@ :context-menu="contextMenuVSCodeContext" /> -
+
{{ formatDateString(home.selectedContentRecord.abortedAt) }}
@@ -181,7 +181,7 @@
{{ formatDateString(home.selectedContentRecord.deployedAt) }}
@@ -610,11 +610,7 @@ const viewContent = () => { margin-bottom: 5px; } -.last-deployment-time { - margin-bottom: 20px; -} - -.aborted-time { +.date-time { margin-bottom: 20px; } From f748b2cb9d2eab3f15dcf06d8374bb79e5245bce Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Mon, 13 Jan 2025 12:22:57 -0800 Subject: [PATCH 08/10] Add description color to style --- extensions/vscode/webviews/homeView/src/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/vscode/webviews/homeView/src/style.css b/extensions/vscode/webviews/homeView/src/style.css index bd418c81d..7dd5579ec 100644 --- a/extensions/vscode/webviews/homeView/src/style.css +++ b/extensions/vscode/webviews/homeView/src/style.css @@ -30,6 +30,10 @@ body { color: var(--vscode-foreground); } +.text-description { + color: var(--vscode-descriptionForeground); +} + .text-placeholder { color: var(--vscode-input-placeholderForeground); } From 6a5ebe4fba7c24426b8b88e8e316b26bf1c6c4f8 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Mon, 13 Jan 2025 12:23:03 -0800 Subject: [PATCH 09/10] Deemphasize last deployment alert description --- .../webviews/homeView/src/components/EvenEasierDeploy.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue index c75218190..b7fd1c854 100644 --- a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue +++ b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue @@ -191,7 +191,7 @@
From 81d645f349d564e6b0561c146a3171d3de23de91 Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Tue, 14 Jan 2025 10:59:24 -0800 Subject: [PATCH 10/10] Show View Content button for canceled deployments if applicable --- .../src/components/EvenEasierDeploy.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue index 3463ae6f7..b0a39e5f3 100644 --- a/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue +++ b/extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue @@ -197,18 +197,18 @@ @click="onErrorMessageAnchorClick" /> -
+
+ - - {{ deployedContentButtonLabel }} - -
+ {{ deployedContentButtonLabel }} +