From 1a783606b4ef22d85e173a2a780d5c49ff208932 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Thu, 14 Nov 2024 13:59:08 +0100 Subject: [PATCH 1/4] fix(editor): Change Home label to Overview (#11736) --- cypress/e2e/39-projects.cy.ts | 6 +++--- .../editor-ui/src/components/Projects/ProjectHeader.test.ts | 2 +- .../editor-ui/src/components/Projects/ProjectHeader.vue | 2 +- .../editor-ui/src/components/Projects/ProjectNavigation.vue | 2 +- packages/editor-ui/src/plugins/i18n/locales/en.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/39-projects.cy.ts b/cypress/e2e/39-projects.cy.ts index 0d4154e646..bbd0508662 100644 --- a/cypress/e2e/39-projects.cy.ts +++ b/cypress/e2e/39-projects.cy.ts @@ -176,7 +176,7 @@ describe('Projects', { disableAutoLogin: true }, () => { let menuItems = cy.getByTestId('menu-item'); menuItems.filter('[class*=active_]').should('have.length', 1); - menuItems.filter(':contains("Home")[class*=active_]').should('exist'); + menuItems.filter(':contains("Overview")[class*=active_]').should('exist'); projects.getMenuItems().first().click(); @@ -222,7 +222,7 @@ describe('Projects', { disableAutoLogin: true }, () => { menuItems = cy.getByTestId('menu-item'); menuItems.filter('[class*=active_]').should('have.length', 1); - menuItems.filter(':contains("Home")[class*=active_]').should('exist'); + menuItems.filter(':contains("Overview")[class*=active_]').should('exist'); workflowsPage.getters.workflowCards().should('have.length', 2).first().click(); @@ -230,7 +230,7 @@ describe('Projects', { disableAutoLogin: true }, () => { cy.getByTestId('execute-workflow-button').should('be.visible'); menuItems = cy.getByTestId('menu-item'); - menuItems.filter(':contains("Home")[class*=active_]').should('not.exist'); + menuItems.filter(':contains("Overview")[class*=active_]').should('not.exist'); menuItems = cy.getByTestId('menu-item'); menuItems.filter('[class*=active_]').should('have.length', 1); diff --git a/packages/editor-ui/src/components/Projects/ProjectHeader.test.ts b/packages/editor-ui/src/components/Projects/ProjectHeader.test.ts index 46b18718bb..01c96a8ad8 100644 --- a/packages/editor-ui/src/components/Projects/ProjectHeader.test.ts +++ b/packages/editor-ui/src/components/Projects/ProjectHeader.test.ts @@ -65,7 +65,7 @@ describe('ProjectHeader', () => { it('should render the correct title', async () => { const { getByText, rerender } = renderComponent(); - expect(getByText('Home')).toBeVisible(); + expect(getByText('Overview')).toBeVisible(); projectsStore.currentProject = { type: ProjectTypes.Personal } as Project; await rerender({}); diff --git a/packages/editor-ui/src/components/Projects/ProjectHeader.vue b/packages/editor-ui/src/components/Projects/ProjectHeader.vue index a89a195975..6432bfcfcb 100644 --- a/packages/editor-ui/src/components/Projects/ProjectHeader.vue +++ b/packages/editor-ui/src/components/Projects/ProjectHeader.vue @@ -23,7 +23,7 @@ const headerIcon = computed(() => { const projectName = computed(() => { if (!projectsStore.currentProject) { - return i18n.baseText('projects.menu.home'); + return i18n.baseText('projects.menu.overview'); } else if (projectsStore.currentProject.type === ProjectTypes.Personal) { return i18n.baseText('projects.menu.personal'); } else { diff --git a/packages/editor-ui/src/components/Projects/ProjectNavigation.vue b/packages/editor-ui/src/components/Projects/ProjectNavigation.vue index 47513ea1d6..fd9145bb99 100644 --- a/packages/editor-ui/src/components/Projects/ProjectNavigation.vue +++ b/packages/editor-ui/src/components/Projects/ProjectNavigation.vue @@ -27,7 +27,7 @@ const isCreatingProject = ref(false); const isComponentMounted = ref(false); const home = computed(() => ({ id: 'home', - label: locale.baseText('projects.menu.home'), + label: locale.baseText('projects.menu.overview'), icon: 'home', route: { to: { name: VIEWS.HOMEPAGE }, diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index ca342147fc..7e7c02315a 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -2499,7 +2499,7 @@ "settings.mfa.title": "Multi-factor Authentication", "settings.mfa.updateConfiguration": "MFA configuration updated", "settings.mfa.invalidAuthenticatorCode": "Invalid authenticator code", - "projects.menu.home": "Home", + "projects.menu.overview": "Overview", "projects.menu.title": "Projects", "projects.menu.personal": "Personal", "projects.menu.addProject": "Add project", From 61fac4f93f81264e75e600874ee0735c9b258ce4 Mon Sep 17 00:00:00 2001 From: Giulio Andreini Date: Thu, 14 Nov 2024 14:25:17 +0100 Subject: [PATCH 2/4] fix(editor): Fix callout component border issue (no-changelog) (#11705) Co-authored-by: Elias Meire --- .../design-system/src/components/N8nCallout/Callout.vue | 8 ++++++++ packages/editor-ui/src/components/banners/BaseBanner.vue | 7 +------ .../banners/__snapshots__/V1Banner.test.ts.snap | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/design-system/src/components/N8nCallout/Callout.vue b/packages/design-system/src/components/N8nCallout/Callout.vue index 9d866715c1..6a796ba32a 100644 --- a/packages/design-system/src/components/N8nCallout/Callout.vue +++ b/packages/design-system/src/components/N8nCallout/Callout.vue @@ -23,6 +23,7 @@ interface CalloutProps { iconless?: boolean; slim?: boolean; roundCorners?: boolean; + onlyBottomBorder?: boolean; } defineOptions({ name: 'N8nCallout' }); @@ -38,6 +39,7 @@ const classes = computed(() => [ $style[props.theme], props.slim ? $style.slim : '', props.roundCorners ? $style.round : '', + props.onlyBottomBorder ? $style.onlyBottomBorder : '', ]); const getIcon = computed( @@ -95,6 +97,12 @@ const getIconSize = computed(() => { border-radius: var(--border-radius-base); } +.onlyBottomBorder { + border-top: 0; + border-left: 0; + border-right: 0; +} + .messageSection { display: flex; align-items: center; diff --git a/packages/editor-ui/src/components/banners/BaseBanner.vue b/packages/editor-ui/src/components/banners/BaseBanner.vue index 32af54cec0..bac58e74db 100644 --- a/packages/editor-ui/src/components/banners/BaseBanner.vue +++ b/packages/editor-ui/src/components/banners/BaseBanner.vue @@ -39,6 +39,7 @@ async function onCloseClick() { icon-size="medium" :round-corners="false" :data-test-id="`banners-${props.name}`" + :only-bottom-border="true" >
@@ -78,10 +79,4 @@ async function onCloseClick() { align-items: center; gap: var(--spacing-l); } - -:global(.n8n-callout) { - border-top: 0; - border-left: 0; - border-right: 0; -} diff --git a/packages/editor-ui/src/components/banners/__snapshots__/V1Banner.test.ts.snap b/packages/editor-ui/src/components/banners/__snapshots__/V1Banner.test.ts.snap index 41daf10517..29665752de 100644 --- a/packages/editor-ui/src/components/banners/__snapshots__/V1Banner.test.ts.snap +++ b/packages/editor-ui/src/components/banners/__snapshots__/V1Banner.test.ts.snap @@ -3,7 +3,7 @@ exports[`V1 Banner > should render banner 1`] = `