From d2e4706b973af490fcdda507ef12b544bdf67c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 13 Mar 2025 11:14:30 +0100 Subject: [PATCH] fix(editor): Fix logo alignment issues (#13870) --- .../editor-ui/src/components/Logo/Logo.vue | 24 ++-------------- .../components/Logo/__tests__/Logo.test.ts | 7 ----- .../__tests__/__snapshots__/Logo.test.ts.snap | 28 ++++--------------- .../src/components/Logo/logo-icon.svg | 2 +- 4 files changed, 8 insertions(+), 53 deletions(-) diff --git a/packages/frontend/editor-ui/src/components/Logo/Logo.vue b/packages/frontend/editor-ui/src/components/Logo/Logo.vue index d6077bc2af..58ff64f251 100644 --- a/packages/frontend/editor-ui/src/components/Logo/Logo.vue +++ b/packages/frontend/editor-ui/src/components/Logo/Logo.vue @@ -22,12 +22,6 @@ const props = defineProps< const { location, releaseChannel } = props; -const showReleaseChannelTag = computed(() => { - if (releaseChannel === 'stable') return false; - if (location === 'authView') return true; - return !props.collapsed; -}); - const showLogoText = computed(() => { if (location === 'authView') return true; return !props.collapsed; @@ -65,7 +59,6 @@ onMounted(() => {
-
{{ releaseChannel }}
@@ -84,19 +77,6 @@ onMounted(() => { } } -.releaseChannelTag { - color: var(--color-text-dark); - padding: var(--spacing-5xs) var(--spacing-4xs); - background-color: var(--color-background-base); - border: 1px solid var(--color-foreground-base); - border-radius: var(--border-radius-base); - font-size: var(--font-size-3xs); - font-weight: var(--font-weight-bold); - text-transform: capitalize; - line-height: var(--font-line-height-regular); - margin: 8px 0 0 3px; -} - .authView { transform: scale(2); margin-bottom: var(--spacing-xl); @@ -104,7 +84,7 @@ onMounted(() => { .logo, .logoText { - transform: scale(1.3); + transform: scale(1.3) translateY(-2px); } .logoText { @@ -113,7 +93,7 @@ onMounted(() => { } .sidebarExpanded .logo { - margin-left: var(--spacing-3xs); + margin-left: var(--spacing-2xs); } .sidebarCollapsed .logo { diff --git a/packages/frontend/editor-ui/src/components/Logo/__tests__/Logo.test.ts b/packages/frontend/editor-ui/src/components/Logo/__tests__/Logo.test.ts index 49b8d1a22f..84432a108a 100644 --- a/packages/frontend/editor-ui/src/components/Logo/__tests__/Logo.test.ts +++ b/packages/frontend/editor-ui/src/components/Logo/__tests__/Logo.test.ts @@ -28,11 +28,4 @@ describe('Logo', () => { }); expect(wrapper.html()).toMatchSnapshot(); }); - - it('renders the releaseChannelTag for non-stable releaseChannel', async () => { - const wrapper = renderComponent({ - props: { location: 'authView', releaseChannel: 'dev' }, - }); - expect(wrapper.html()).toMatchSnapshot(); - }); }); diff --git a/packages/frontend/editor-ui/src/components/Logo/__tests__/__snapshots__/Logo.test.ts.snap b/packages/frontend/editor-ui/src/components/Logo/__tests__/__snapshots__/Logo.test.ts.snap index 3a05aaf73d..a6b0809c0d 100644 --- a/packages/frontend/editor-ui/src/components/Logo/__tests__/__snapshots__/Logo.test.ts.snap +++ b/packages/frontend/editor-ui/src/components/Logo/__tests__/__snapshots__/Logo.test.ts.snap @@ -1,49 +1,31 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Logo > renders the logo for authView location 1`] = ` -"
- - -
" +
" `; exports[`Logo > renders the logo for sidebar location when sidebar is collapsed 1`] = ` -"