diff --git a/frontend/src/v2/V2App.tsx b/frontend/src/v2/V2App.tsx index 17e34c68d..14c88bf66 100644 --- a/frontend/src/v2/V2App.tsx +++ b/frontend/src/v2/V2App.tsx @@ -337,7 +337,7 @@ const V2App: React.FC = () => { /> , false, false)} + element={feature('Settings', , false, false, 'v2-feature--settings')} /> { test('Settings is one screen: grouped cards, no jump nav', () => { expect(settingsPage).not.toContain('v2-settings__nav'); - expect(ruleBody(v2, '.v2-settings__content')).toContain('width: min(100%, 640px)'); + expect(ruleBody(v2, '.v2-settings__content')).toContain('width: min(100%, 760px)'); expect(ruleBody(v2, '.v2-settings__edit--closed')).toContain('display: none'); expect(ruleBody(v2, '.v2-settings__group,\n.v2-settings__fold')).toContain('overflow: hidden'); expect(ruleBody(v2, '.v2-settings__row > .v2-settings__row-value')).toContain('min-width: 0'); diff --git a/frontend/src/v2/__tests__/v2-phone-shell.test.ts b/frontend/src/v2/__tests__/v2-phone-shell.test.ts index 3d75a0287..625d9756e 100644 --- a/frontend/src/v2/__tests__/v2-phone-shell.test.ts +++ b/frontend/src/v2/__tests__/v2-phone-shell.test.ts @@ -29,12 +29,21 @@ describe('D223 phone shell', () => { test('the page body is one tight column and settings leads with the same bar', () => { expect(phone).toMatch(/\.v2-feature__body\s*\{[^}]*padding:\s*12px 12px 16px/); - expect(phone).toMatch(/\.v2-settings__title\s*\{[^}]*min-height:\s*52px/); + expect(fs.readFileSync(path.join(__dirname, '../primitives/primitives.css'), 'utf8')).toMatch(/\.v2p-ph\s*\{[^}]*min-height:\s*52px/); }); test('the block comes last in the sheet, so it outranks the earlier phone rules', () => { const at = css.indexOf('D223 (TASK-730 shell)'); - expect(at).toBeGreaterThan(css.indexOf('.v2-settings__title {')); + expect(at).toBeGreaterThan(css.indexOf('.v2-settings__layout {')); expect(css.indexOf('.v2-feature__body {')).toBeLessThan(at); }); + + test('the settings head spans the pane and only the body scrolls', () => { + expect(phone).toMatch(/\.v2-feature--settings > \.v2-feature__body\s*\{[^}]*padding:\s*0/); + expect(phone).toMatch(/\.v2-feature--settings \.v2-feature__legacy\s*\{[^}]*max-width:\s*none/); + expect(fs.readFileSync(path.join(__dirname, '../V2App.tsx'), 'utf8')).toContain("'v2-feature--settings'"); + expect(fs.readFileSync(path.join(__dirname, '../components/V2SettingsPage.tsx'), 'utf8')).toContain('
'); + expect(css).toMatch(/\.v2-settings__content\s*\{[^}]*width:\s*min\(100%, 760px\)/); + expect(phone).toMatch(/\.v2-feature--settings \.v2-settings__layout\s*\{[^}]*overflow-y:\s*auto/); + }); }); diff --git a/frontend/src/v2/components/V2SettingsPage.tsx b/frontend/src/v2/components/V2SettingsPage.tsx index 5fc244521..63b5a7460 100644 --- a/frontend/src/v2/components/V2SettingsPage.tsx +++ b/frontend/src/v2/components/V2SettingsPage.tsx @@ -5,6 +5,7 @@ import axios from '../../utils/axiosConfig'; import { getAvatarSrc } from '../../utils/avatarUtils'; import { useAuth } from '../../context/AuthContext'; import AppsManagement from '../../components/AppsManagement'; +import '../primitives/primitives.css'; import V2BillingPanel from './V2BillingPanel'; import V2DevicesPanel from './V2DevicesPanel'; import V2DeleteAccount from './V2DeleteAccount'; @@ -585,8 +586,8 @@ const V2SettingsPage: React.FC = () => { return (
-
-

Settings

+

Settings

+
diff --git a/frontend/src/v2/v2.css b/frontend/src/v2/v2.css index 2d1c265a1..4fa910a6b 100644 --- a/frontend/src/v2/v2.css +++ b/frontend/src/v2/v2.css @@ -7801,15 +7801,6 @@ body.modern-ui.v2-canvas { padding-top: 40px; } -.v2-settings__title { - margin: 0; - color: var(--v2-text-primary); - font-family: var(--v2-font-display); - font-size: 28px; - font-weight: 700; - letter-spacing: -0.03em; - line-height: 1.1; -} .v2-settings__section { min-width: 0; } @@ -7904,7 +7895,8 @@ details[open] > .v2-settings__summary > .v2-settings__icon:last-child { transfor display: flex; flex-direction: column; gap: 20px; - width: min(100%, 640px); + width: min(100%, 760px); + min-width: 0; margin: 0 auto; } @@ -8500,12 +8492,6 @@ details[open] > .v2-settings__summary > .v2-settings__icon:last-child { transfor padding-top: 24px; } - .v2-settings__title { - margin-bottom: 24px; - font-size: 28px; - } - - .v2-settings__token-value { grid-template-columns: 1fr 1fr; } @@ -10893,7 +10879,6 @@ details[open] > .v2-settings__summary > .v2-settings__icon:last-child { transfor .v2-root:lang(zh) .v2-login__title, .v2-root:lang(zh) .v2-feature__title, .v2-root:lang(zh) .v2-feature__header .v2-feature__title, -.v2-root:lang(zh) .v2-settings__title, .v2-root:lang(zh) .v2-settings__label, .v2-root:lang(zh) .v2-settings__account-name, .v2-root:lang(zh) .v2-settings__section .v2-billing__title, @@ -14084,14 +14069,12 @@ details[open] > .v2-settings__summary > .v2-settings__icon:last-child { transfor .v2-feature__header .v2-page-head__meta { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .v2-feature__body { padding: 12px 12px 16px; } .v2-settings__layout { padding-top: 0; } - .v2-settings__title { - display: flex; - align-items: center; - min-height: 52px; - margin: -12px -12px 12px; - padding: 0 12px; - border-bottom: 1px solid var(--v2-border-soft); - font: 800 21px/1 var(--v2-font-display); - letter-spacing: -0.03em; - } } + +/* D223 (TASK-688): the artboard's 64px head spans the pane edge to edge and only the + body below it scrolls, so the settings route drops the feature body padding and the + legacy wrapper's max-width, the same way connectors does. */ +.v2-feature--settings > .v2-feature__body { padding: 0; display: flex; flex-direction: column; overflow: hidden; } +.v2-feature--settings .v2-feature__legacy { flex: 1 1 auto; width: 100%; max-width: none; min-height: 0; margin: 0; display: flex; flex-direction: column; } +.v2-feature--settings .v2-settings { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; width: 100%; } +.v2-feature--settings .v2-settings__layout { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-top: 24px; }