fix(frontend): refine settings dialog layout
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -127,6 +127,15 @@ test("the settings pane menu separates hover from current without an accent bar"
|
||||
for (const rule of hoverRules) assert.ok(!rule.includes('[aria-current="page"]'), `current and hover must be separate rules: ${rule}`);
|
||||
});
|
||||
|
||||
test("settings navigation uses two columns without a misleading chevron", () => {
|
||||
const overlay = readFileSync(new URL("../src/components/account-dialog-overlay.tsx", import.meta.url), "utf8");
|
||||
const styles = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
|
||||
assert.doesNotMatch(overlay, /<ChevronRight/);
|
||||
assert.match(cssDeclarations(".settings-dialog-nav-item", styles), /grid-template-columns:\s*18px\s+minmax\(0,\s*1fr\)/);
|
||||
assert.match(cssDeclarations(".settings-dialog-nav", styles), /border-right:\s*1px\s+solid\s+var\(--color-border\)/);
|
||||
assert.match(cssDeclarations(".settings-dialog-content", styles), /padding:\s*0\s+var\(--space-8\)\s+var\(--space-8\)/);
|
||||
});
|
||||
|
||||
test("form panes get a reading-width cap, list panes stay full-bleed", () => {
|
||||
// T8.1 / E13: the 880px dialog leaves ~690px of content, which pulls a one-column
|
||||
// form apart. The cap is applied per pane, inside the content box.
|
||||
@@ -149,7 +158,8 @@ test("form panes get a reading-width cap, list panes stay full-bleed", () => {
|
||||
}
|
||||
|
||||
const cap = cssDeclarations(".settings-dialog-content--form > *", styles);
|
||||
assert.match(cap, /max-width:\s*4[2-6]\dpx/, "cap belongs in the 420-460px reading-width band");
|
||||
// 原值:420–460px;新值:560px;原因:右侧内容区增加内边距后,资料表单仍需使用舒适的阅读宽度,避免右侧留下过大的空白。
|
||||
assert.match(cap, /max-width:\s*560px/, "cap uses the wider 560px reading width");
|
||||
assert.match(cap, /margin-right:\s*auto/, "capped content is left aligned");
|
||||
});
|
||||
|
||||
|
||||
@@ -110,6 +110,8 @@ test("the chart library starts as a list and only renders a form after a view ch
|
||||
assert.match(charts, /useState<ChartLibraryView>\(CHART_LIBRARY_LIST_VIEW\)/);
|
||||
assert.doesNotMatch(list, /ChartProfileForm|<form/);
|
||||
assert.match(list, /添加其他人/);
|
||||
// 原值:仅断言列表中存在“添加其他人”;新值:同步锁定标题操作区;原因:入口从列表末尾移到“其他人”分组标题,长列表中位置仍稳定。
|
||||
assert.match(charts, /chart-library-group-heading-actions[\s\S]{0,900}添加其他人/);
|
||||
assert.match(charts, /setView\(\{ kind: "add" \}\)/);
|
||||
assert.match(charts, /setView\(CHART_LIBRARY_LIST_VIEW\)/);
|
||||
});
|
||||
|
||||
@@ -8,7 +8,8 @@ test("the profile pane keeps avatar palettes and drops the duplicate chart-libra
|
||||
assert.doesNotMatch(panel, /管理星盘资料/);
|
||||
assert.match(panel, /role="radiogroup"/);
|
||||
assert.match(panel, /换一个形象/);
|
||||
assert.match(panel, /size=\{48\}/);
|
||||
// 原值:48px;新值:56px;原因:设置面板的头像预览需要更清晰的视觉锚点,并与账户身份区留出稳定间距。
|
||||
assert.match(panel, /size=\{56\}/);
|
||||
assert.match(panel, /账户信息/);
|
||||
assert.match(panel, /登录邮箱/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user