The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Hide app settings tab bar when General is the only tab (#28720)
martmull6b266ce21a4a
diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsxindex 2afc5b1e489..1b5a10da1fc 100644--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationDetails.tsx@@ -423,7 +423,7 @@ export const SettingsApplicationDetails = () => {) : undefined}secondaryBar={- isNotFound || isUnavailable ? undefined : (+ isNotFound || isUnavailable || tabs.length <= 1 ? undefined : (<SettingsTabBararia-label={t`Application details`}tabs={tabs}diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsxindex 0130e992e54..3140fdfcdb1 100644--- a/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsx+++ b/packages/twenty-front/src/pages/settings/applications/SettingsBuiltInAccountAppDetails.tsx@@ -4,14 +4,10 @@ import { getBuiltInAccountAppLogoUrl } from '@/settings/app-preferences/utils/geimport { SettingsApplicationOverviewCard } from '@/settings/applications/components/SettingsApplicationOverviewCard';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';-import { SettingsTabBar } from '@/settings/components/layout/SettingsTabBar';import { useLingui } from '@lingui/react/macro';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components/layout';-import { IconSettings } from 'twenty-ui/icon';--const BUILT_IN_ACCOUNT_APP_DETAILS_TAB_LIST_ID = 'built-in-account-app-details';type SettingsBuiltInAccountAppDetailsProps = {builtInAccountApp: BuiltInAccountApp;@@ -47,13 +43,6 @@ export const SettingsBuiltInAccountAppDetails = ({},{ children: appName },]}- secondaryBar={- <SettingsTabBar- aria-label={t`Application details`}- tabs={[{ id: 'general', title: t`General`, Icon: IconSettings }]}- componentInstanceId={BUILT_IN_ACCOUNT_APP_DETAILS_TAB_LIST_ID}- />- }><SettingsPageContainer overflow="visible"><Section.Root>diff --git a/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx b/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsxindex 6ab4f809b18..321950b9b0e 100644--- a/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx+++ b/packages/twenty-front/src/pages/settings/applications/__stories__/SettingsApplicationDetails.stories.tsx@@ -287,7 +287,7 @@ const seedBuiltInAccountAppStory = ({});};-export const BuiltInAccountAppShowsGeneralTab: Story = {+export const BuiltInAccountAppHidesSingleGeneralTab: Story = {args: {routeParams: { ':applicationId': 'google' },},@@ -303,7 +303,9 @@ export const BuiltInAccountAppShowsGeneralTab: Story = {{ timeout: 3000 },),).toBeVisible();- expect(canvas.getByTestId('tab-general')).toBeVisible();+ expect(+ canvas.queryByRole('link', { name: 'General' }),+ ).not.toBeInTheDocument();},};