From 800262e0b5143d48c12c7c4a29f67f091132f003 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 6 Sep 2023 18:30:58 +0200 Subject: [PATCH 1/3] fix: design fixes from QA --- .../functions/steps/gitConfiguration.svelte | 20 +-- .../function-[function]/createCli.svelte | 2 +- .../function-[function]/createGit.svelte | 92 +++++++------- .../function-[function]/createManual.svelte | 27 ++-- .../deployment-[deployment]/+page.svelte | 5 +- .../function-[function]/execute.svelte | 120 +++++++++--------- .../settings/disconnectRepo.svelte | 4 +- .../settings/updateConfiguration.svelte | 23 +--- .../promoteVariableModal.svelte | 2 - .../uploadVariablesModal.svelte | 9 +- 10 files changed, 144 insertions(+), 160 deletions(-) diff --git a/src/lib/wizards/functions/steps/gitConfiguration.svelte b/src/lib/wizards/functions/steps/gitConfiguration.svelte index ff6463b1dd..d021ca6567 100644 --- a/src/lib/wizards/functions/steps/gitConfiguration.svelte +++ b/src/lib/wizards/functions/steps/gitConfiguration.svelte @@ -1,5 +1,5 @@ - +

Deploy your function using the Appwrite CLI by running the following command inside your function's folder. diff --git a/src/routes/console/project-[project]/functions/function-[function]/createGit.svelte b/src/routes/console/project-[project]/functions/function-[function]/createGit.svelte index be6d88241b..4360458c19 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/createGit.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/createGit.svelte @@ -8,7 +8,7 @@ export let show = false; - + {#if $func.installationId && $func.providerRepositoryId}

Deploy your function from the Git provider of your choice by following the steps below. @@ -19,52 +19,50 @@ class="link">documentation.

- - - - Checkout your production branch. -
- -
-
- - Add your changes -
- -
-
- - Create a new commit -
- -
-
- - Push your new commit -
- -
-
- - A new deployment will be triggered automatically. - -
-
+ + + Checkout your production branch. +
+ +
+
+ + Add your changes +
+ +
+
+ + Create a new commit +
+ +
+
+ + Push your new commit +
+ +
+
+ + A new deployment will be triggered automatically. + +
{:else}
diff --git a/src/routes/console/project-[project]/functions/function-[function]/createManual.svelte b/src/routes/console/project-[project]/functions/function-[function]/createManual.svelte index be24aece1e..024ec8f6eb 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/createManual.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/createManual.svelte @@ -1,12 +1,5 @@ - +

Manually deploy a function by uploading a zip file containing the source code and a relative path to the entry point. @@ -66,7 +65,7 @@ class="link">Learn more about function deployments.

- + Build settings (optional) - - +

+ Overwrite your function configuration for a single deployment or save + commands for future use. +

+
-
+

Build {$func.name}

{#if $deployment.status === 'building'} Building... {:else} - {$deployment.status} + {$deployment.status} {/if}
diff --git a/src/routes/console/project-[project]/functions/function-[function]/execute.svelte b/src/routes/console/project-[project]/functions/function-[function]/execute.svelte index 26824e5f73..6302f5d97f 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/execute.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/execute.svelte @@ -147,66 +147,68 @@ tooltip="Headers should contain alphanumeric characters (a-z, A-Z, and 0-9) and hyphens only (- and _)."> Headers +
+ + {#if headers} + {#each headers as [name, value], index} + + + + + + + + {/each} + {/if} + + +
-
- - {#if headers} - {#each headers as [name, value], index} - - - - - - - - {/each} - {/if} - - -
+

- Are you sure you want to disconnect {$func.name}? This will affect future deployments to - this function. + Are you sure you want to disconnect {$func.name}? This will affect future deployments + to this function.

diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte index df75532d11..e29904e787 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte @@ -102,15 +102,6 @@ azure = 'Azure' } - function getProviderIcon(provider: string) { - switch (provider) { - case 'github': - return 'icon-github'; - default: - return ''; - } - } - function getRepositoryLink(repository: Models.ProviderRepository) { switch (repository.provider) { case 'github': @@ -218,21 +209,21 @@ {#if repository} -
-
- -
-
+
+ +
{repository.name} {#if repository.private}
-

Last updated: {toLocaleDateTime(repository.pushedAt)}

+

+ Last updated: {toLocaleDateTime(repository.pushedAt)} +

diff --git a/src/routes/console/project-[project]/promoteVariableModal.svelte b/src/routes/console/project-[project]/promoteVariableModal.svelte index 785ef5f740..8216fed3a0 100644 --- a/src/routes/console/project-[project]/promoteVariableModal.svelte +++ b/src/routes/console/project-[project]/promoteVariableModal.svelte @@ -16,8 +16,6 @@ onSubmit={() => { dispatch('promoted'); }} - icon="exclamation" - state="warning" headerDivider={false}> {isConflicting ? 'Overwrite global variable' : 'Promote variable'} diff --git a/src/routes/console/project-[project]/uploadVariablesModal.svelte b/src/routes/console/project-[project]/uploadVariablesModal.svelte index 0a8484b7c9..0bf44006a0 100644 --- a/src/routes/console/project-[project]/uploadVariablesModal.svelte +++ b/src/routes/console/project-[project]/uploadVariablesModal.svelte @@ -68,10 +68,13 @@ Import new {isGlobal ? 'global' : 'environment'} variables -
+

- Import new {isGlobal ? 'global' : 'environment'} variables from .env file that will be passed - to {isGlobal ? 'all functions within your project' : 'your function'}. + Import new {isGlobal ? 'global' : 'environment'} variables from + .env + file that will be passed to {isGlobal + ? 'all functions within your project' + : 'your function'}.

{#if variableList.total > 0} From e7b16b7255bfac36aa7699ccd0a3f8c759aba6a1 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 6 Sep 2023 18:39:52 +0200 Subject: [PATCH 2/3] fix: design and logic in env variables card --- .../project-[project]/updateVariables.svelte | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/routes/console/project-[project]/updateVariables.svelte b/src/routes/console/project-[project]/updateVariables.svelte index f9232bf84b..8a17fa61d0 100644 --- a/src/routes/console/project-[project]/updateVariables.svelte +++ b/src/routes/console/project-[project]/updateVariables.svelte @@ -174,8 +174,9 @@ - {isGlobal ? 'Global Variables' : 'Environment Variables'} + + {isGlobal ? 'Global variables' : 'Environment variables'} + {#if isGlobal}

Set the environment variables or secret keys that will be passed to all functions within @@ -216,7 +217,7 @@

{@const sum = variableList.total} {#if sum} -
+
{#if conflictVariables.length > 0}

@@ -227,7 +228,7 @@ {/if} a naming conflict with a global variable. View global variables in project settings - Key + Key Value - + {#each variableList.variables.slice(offset, offset + limit) as variable, i} @@ -251,16 +252,16 @@ globalVariable.key === variable.key ) !== undefined : false} - {#if isConflicting} -

+ class={isConflicting && hasConflictOnPage + ? 'u-flex u-gap-4 u-cross-center' + : ''}> + {#if isConflicting && hasConflictOnPage} +