From 5489e602cab2815e4a8bdb93cba64a1b98ce68b2 Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Mon, 14 Aug 2023 15:56:12 +0100 Subject: [PATCH 01/46] small design review --- src/lib/commandCenter/commands.ts | 8 +++++--- src/lib/commandCenter/panels/template.svelte | 20 +++++++++++++++++++- src/routes/console/+layout.svelte | 8 -------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/lib/commandCenter/commands.ts b/src/lib/commandCenter/commands.ts index 734a3ab6a6..9b5707e61a 100644 --- a/src/lib/commandCenter/commands.ts +++ b/src/lib/commandCenter/commands.ts @@ -288,9 +288,11 @@ export const commandGroupRanks = derived(groupRanksMap, ($groupRankTransformatio const initialRanks = { ...Object.fromEntries(groups.map((group) => [group, 0])), ungrouped: 9999, - databases: 3, - users: 2, - teams: 1, + databases: 4, + users: 3, + teams: 2, + projects: 1, + organizations: 0, navigation: -10, help: -20, misc: -30 diff --git a/src/lib/commandCenter/panels/template.svelte b/src/lib/commandCenter/panels/template.svelte index 61d543bda8..08d33d7b2b 100644 --- a/src/lib/commandCenter/panels/template.svelte +++ b/src/lib/commandCenter/panels/template.svelte @@ -458,6 +458,8 @@ position: relative; z-index: 10; + font-size: 10px !important; + &:not(:first-child) { margin-block-start: 1rem; } @@ -475,12 +477,28 @@ } .option { - padding: 0.5rem 0.75rem; + padding: 0.5rem 9.5px; + font-size: 14px; position: relative; z-index: 10; width: 100%; box-shadow: none !important; + + :global(i[class^='icon-']) { + font-size: 1rem !important; + width: 1rem !important; + height: 1rem !important; + + position: relative; + } + + :global(i[class^='icon-']::before) { + position: absolute; + top: 50%; + left: 50%; + translate: -50% -50%; + } } &.nested { diff --git a/src/routes/console/+layout.svelte b/src/routes/console/+layout.svelte index 37080eb23e..efcd11c0da 100644 --- a/src/routes/console/+layout.svelte +++ b/src/routes/console/+layout.svelte @@ -67,14 +67,6 @@ keys: ['c', 'o'], group: 'organizations' }, - { - label: 'Go to home', - callback: () => { - goto('/console'); - }, - keys: ['h'], - group: 'navigation' - }, { label: 'Open documentation', callback: () => { From d11fa022217ebef4e09471e31bec80351f042c73 Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:58:08 +0100 Subject: [PATCH 02/46] more design review changes --- src/lib/commandCenter/commandCenter.svelte | 1 - src/lib/commandCenter/panels/template.svelte | 10 ++++++- src/lib/stores/sdk.ts | 6 ++--- src/routes/console/+layout.svelte | 17 ++++++++++-- .../+layout.svelte | 26 +++++++++++++++++++ 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/lib/commandCenter/commandCenter.svelte b/src/lib/commandCenter/commandCenter.svelte index 3dcf142f98..72a7bcd72a 100644 --- a/src/lib/commandCenter/commandCenter.svelte +++ b/src/lib/commandCenter/commandCenter.svelte @@ -126,7 +126,6 @@ left: 50%; transform: translateX(-50%); padding: 0.5rem; - // background-color: hsl(var(--color-neutral-500) / 0.5); z-index: 9999; display: flex; diff --git a/src/lib/commandCenter/panels/template.svelte b/src/lib/commandCenter/panels/template.svelte index 08d33d7b2b..217c22c313 100644 --- a/src/lib/commandCenter/panels/template.svelte +++ b/src/lib/commandCenter/panels/template.svelte @@ -350,6 +350,9 @@ --result-bg: hsl(var(--color-neutral-10)); --footer-bg: linear-gradient(180deg, #fff 0%, #e8e9f0 100%); + + --icon-color: hsl(var(--color-neutral-50)); + --label-color: hsl(var(--color-neutral-100)); } :global(.theme-dark) .card { @@ -364,6 +367,9 @@ --result-bg: hsl(var(--color-neutral-200)); --footer-bg: linear-gradient(180deg, #1b1b28 0%, #282a3b 100%); + + --icon-color: hsl(var(--color-neutral-70)); + --label-color: hsl(var(--color-neutral-30)); } // Elements @@ -485,11 +491,13 @@ box-shadow: none !important; + color: var(--label-color); + :global(i[class^='icon-']) { font-size: 1rem !important; width: 1rem !important; height: 1rem !important; - + color: var(--icon-color); position: relative; } diff --git a/src/lib/stores/sdk.ts b/src/lib/stores/sdk.ts index 56c09cbc5d..6142c9c1cd 100644 --- a/src/lib/stores/sdk.ts +++ b/src/lib/stores/sdk.ts @@ -8,7 +8,7 @@ import { Functions, Health, Locale, - Migrations, + // Migrations, Projects, Project, Storage, @@ -35,7 +35,7 @@ const sdkForProject = { storage: new Storage(clientProject), teams: new Teams(clientProject), users: new Users(clientProject), - migrations: new Migrations(clientProject) + // migrations: new Migrations(clientProject) }; export const getSdkForProject = (projectId: string) => { @@ -57,7 +57,7 @@ export const sdk = { projects: new Projects(clientConsole), teams: new Teams(clientConsole), users: new Users(clientConsole), - migrations: new Migrations(clientConsole) + // migrations: new Migrations(clientConsole) }, get forProject() { const projectId = getProjectId(); diff --git a/src/routes/console/+layout.svelte b/src/routes/console/+layout.svelte index efcd11c0da..bdb1415017 100644 --- a/src/routes/console/+layout.svelte +++ b/src/routes/console/+layout.svelte @@ -26,7 +26,19 @@ $: $registerCommands([ { - label: 'Ask AI', + label: 'Go to projects', + callback: () => { + goto('/console'); + }, + keys: ['g', 'p'], + group: 'navigation', + disabled: + $page.url.pathname.includes('/console/organization-') && + !$page.url.pathname.endsWith('/members') && + !$page.url.pathname.endsWith('/settings') + }, + { + label: 'Ask the AI', callback: () => { addSubPanel(AIPanel); }, @@ -39,7 +51,8 @@ goto('/console/account'); }, keys: ['i'], - group: 'navigation' + group: 'navigation', + rank: 1 }, { label: 'Find an organization', diff --git a/src/routes/console/organization-[organization]/+layout.svelte b/src/routes/console/organization-[organization]/+layout.svelte index 8dc64cbec8..dbc4fbb266 100644 --- a/src/routes/console/organization-[organization]/+layout.svelte +++ b/src/routes/console/organization-[organization]/+layout.svelte @@ -1,13 +1,39 @@ From 03deb8d6185e508a3cb87be75a98ffdcc89b5884 Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:59:27 +0100 Subject: [PATCH 03/46] mock migrations --- src/lib/stores/sdk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/stores/sdk.ts b/src/lib/stores/sdk.ts index 6142c9c1cd..106fa6d479 100644 --- a/src/lib/stores/sdk.ts +++ b/src/lib/stores/sdk.ts @@ -35,7 +35,7 @@ const sdkForProject = { storage: new Storage(clientProject), teams: new Teams(clientProject), users: new Users(clientProject), - // migrations: new Migrations(clientProject) + migrations: {} }; export const getSdkForProject = (projectId: string) => { @@ -57,7 +57,7 @@ export const sdk = { projects: new Projects(clientConsole), teams: new Teams(clientConsole), users: new Users(clientConsole), - // migrations: new Migrations(clientConsole) + migrations: {} }, get forProject() { const projectId = getProjectId(); From 74de2e584fcf641d8ed6e11a75f9ffaf35341da8 Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:41:53 +0100 Subject: [PATCH 04/46] change ai logo in console --- src/lib/commandCenter/panels/ai.svelte | 38 ++++++-------------- src/lib/commandCenter/panels/template.svelte | 2 +- static/icons/dark/color/sparkles.svg | 24 +++++++++++++ static/icons/light/color/sparkles.svg | 24 +++++++++++++ 4 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 static/icons/dark/color/sparkles.svg create mode 100644 static/icons/light/color/sparkles.svg diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte index 3cc6a54096..eb5296f9f8 100644 --- a/src/lib/commandCenter/panels/ai.svelte +++ b/src/lib/commandCenter/panels/ai.svelte @@ -1,13 +1,12 @@