Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/v2/V2App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const V2App: React.FC = () => {
/>
<Route
path="settings"
element={feature('Settings', <V2SettingsPage />, false, false)}
element={feature('Settings', <V2SettingsPage />, false, false, 'v2-feature--settings')}
/>
<Route
path="settings/devices"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/v2/__tests__/v2-layout-invariants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ describe('v2 layout invariants (CSS rule presence)', () => {

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');
Expand Down
13 changes: 11 additions & 2 deletions frontend/src/v2/__tests__/v2-phone-shell.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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('<header className="v2p-ph">');
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/);
});
});
5 changes: 3 additions & 2 deletions frontend/src/v2/components/V2SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -585,8 +586,8 @@ const V2SettingsPage: React.FC = () => {

return (
<div className="v2-settings" aria-label="Settings">
<div className="v2-settings__layout">
<h1 className="v2-settings__title">Settings</h1>
<header className="v2p-ph"><h1>Settings</h1></header>
<div className="v2p-body v2-settings__layout">
<div className="v2-settings__content">
<SettingsSection id="account" title="Account">
<V2AccountSection />
Expand Down
37 changes: 10 additions & 27 deletions frontend/src/v2/v2.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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; }
Loading