🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
💄 style(settings): widen the Plans tab so four plan cards fit (#23242)
YuTengjing88a905b8cf67
diff --git a/src/components/Skeleton/Settings/Frame.tsx b/src/components/Skeleton/Settings/Frame.tsxindex 9f497de852d..18b7b5f0ccc 100644--- a/src/components/Skeleton/Settings/Frame.tsx+++ b/src/components/Skeleton/Settings/Frame.tsx@@ -5,7 +5,7 @@ import type { ReactNode } from 'react';import NavHeader from '@/features/NavHeader';import SettingContainer from '@/features/Setting/SettingContainer';-import { SETTINGS_CONTAINER_MAX_WIDTH } from '@/features/Settings/features/ownFrameTabs';+import { getSettingsContainerMaxWidth } from '@/features/Settings/features/ownFrameTabs';import { SettingsPageActionsRow } from '@/features/Settings/features/SettingsPageActions';import { useSettingsTabTitle } from '@/features/Settings/features/tabTitles';@@ -26,7 +26,7 @@ export const SettingsSkeletonHeader = ({ tab }: { tab: string }) => {};/**- * Same header + padded 1024px container+ * Same header + padded content column (1024px, wider for Plans)* `SettingsContent` draws around a tab body, with the page-action placeholders* in the same row at the top of the content column.*/@@ -42,7 +42,7 @@ export const SettingsSkeletonFrame = ({<Flexbox aria-busy flex={1} height={'100%'} style={{ minHeight: 0, overflow: 'hidden' }}><SettingsSkeletonHeader tab={tab} /><SettingContainer- maxWidth={SETTINGS_CONTAINER_MAX_WIDTH}+ maxWidth={getSettingsContainerMaxWidth(tab)}paddingBlock={'24px 128px'}paddingInline={24}>diff --git a/src/features/Settings/features/SettingsContent.tsx b/src/features/Settings/features/SettingsContent.tsxindex 75af051f31f..72d45a2e538 100644--- a/src/features/Settings/features/SettingsContent.tsx+++ b/src/features/Settings/features/SettingsContent.tsx@@ -12,7 +12,7 @@ import { serverConfigSelectors, useServerConfigStore } from '@/store/serverConfiimport { ManageMemoryButton } from '../memory/features/ManageMemoryButton';import { componentMap } from './componentMap';-import { OWN_FRAME_TABS, SETTINGS_CONTAINER_MAX_WIDTH } from './ownFrameTabs';+import { getSettingsContainerMaxWidth, OWN_FRAME_TABS } from './ownFrameTabs';import { SettingsPageActionsContext, SettingsPageActionsRow } from './SettingsPageActions';import { useSettingsTabTitle } from './tabTitles';@@ -97,7 +97,7 @@ const SettingsContent = ({ mobile, activeTab }: SettingsContentProps) => {</NavHeader><SettingsPageActionsContext value={pageActions}><SettingContainer- maxWidth={SETTINGS_CONTAINER_MAX_WIDTH}+ maxWidth={getSettingsContainerMaxWidth(tabKey)}paddingBlock={'24px 128px'}paddingInline={24}>diff --git a/src/features/Settings/features/ownFrameTabs.test.ts b/src/features/Settings/features/ownFrameTabs.test.tsnew file mode 100644index 00000000000..f8f95fef6fb--- /dev/null+++ b/src/features/Settings/features/ownFrameTabs.test.ts@@ -0,0 +1,23 @@+import { describe, expect, it } from 'vitest';++import { SettingsTabs } from '@/store/global/initialState';++import {+ getSettingsContainerMaxWidth,+ SETTINGS_CONTAINER_MAX_WIDTH,+ SETTINGS_PLANS_MAX_WIDTH,+} from './ownFrameTabs';++describe('getSettingsContainerMaxWidth', () => {+ it('gives the Plans tab a wider column than the shared one', () => {+ expect(getSettingsContainerMaxWidth(SettingsTabs.Plans)).toBe(SETTINGS_PLANS_MAX_WIDTH);+ expect(SETTINGS_PLANS_MAX_WIDTH).toBeGreaterThan(SETTINGS_CONTAINER_MAX_WIDTH);+ });++ it('keeps every other tab on the shared column', () => {+ expect(getSettingsContainerMaxWidth(SettingsTabs.Billing)).toBe(SETTINGS_CONTAINER_MAX_WIDTH);+ expect(getSettingsContainerMaxWidth(SettingsTabs.Appearance)).toBe(+ SETTINGS_CONTAINER_MAX_WIDTH,+ );+ });+});diff --git a/src/features/Settings/features/ownFrameTabs.ts b/src/features/Settings/features/ownFrameTabs.tsindex e4b577b3f18..991f1d0ec60 100644--- a/src/features/Settings/features/ownFrameTabs.ts+++ b/src/features/Settings/features/ownFrameTabs.ts@@ -18,3 +18,17 @@ export const OWN_FRAME_TABS = new Set<string>([* columns to this width instead of spanning the pane.*/export const SETTINGS_CONTAINER_MAX_WIDTH = 1024;++/**+ * Width of the Plans tab column. Its four plan cards side by side get about+ * 226px each in the shared 1024 column, which wraps prices and feature rows+ * on wide screens; 1280 gives each card about 290px.+ */+export const SETTINGS_PLANS_MAX_WIDTH = 1280;++/**+ * Content column width for a tab. Every tab shares+ * `SETTINGS_CONTAINER_MAX_WIDTH` except the Plans tab.+ */+export const getSettingsContainerMaxWidth = (tab: string) =>+ tab === SettingsTabs.Plans ? SETTINGS_PLANS_MAX_WIDTH : SETTINGS_CONTAINER_MAX_WIDTH;