From 8d64ea888500d258e33f780df172bfb40a7e802b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 2 Sep 2026 04:59:56 +0000 Subject: [PATCH] fix(web): lock Element Plus input tokens to 16px, nav chips to 12px QA still saw runway fields because --el-border-radius-base was 20. Set EP input/select tokens and wrappers to 16px; keep cards 24 and primary buttons pill. Co-authored-by: yibaiba --- web/src/App.vue | 2 +- web/src/components/commands/BalancePanel.vue | 2 +- web/src/components/commands/CommandChat.vue | 2 +- web/src/components/commands/CommandComposer.vue | 2 +- web/src/layouts/AuthenticatedShell.vue | 4 ++-- web/src/style.css | 17 +++++++++++++---- web/src/views/Login.vue | 2 +- web/tests/themeSource.test.ts | 7 +++++-- 8 files changed, 25 insertions(+), 13 deletions(-) diff --git a/web/src/App.vue b/web/src/App.vue index 86d40b4c..8ef50c03 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -294,7 +294,7 @@ function retryStartup() { .license-input { border: 1px solid var(--ui-border); - border-radius: var(--ui-radius-input); + border-radius: 16px; background: var(--ui-surface-subtle); color: var(--ui-text); } diff --git a/web/src/components/commands/BalancePanel.vue b/web/src/components/commands/BalancePanel.vue index b5aaedc0..4377b3fd 100644 --- a/web/src/components/commands/BalancePanel.vue +++ b/web/src/components/commands/BalancePanel.vue @@ -213,7 +213,7 @@ function ruleSourceLabel(rule: CarrierQueryRule): string { .query-row { display: grid; grid-template-columns: minmax(0, 1fr); } .query-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; } .device-select { min-width: 0; } -.query-row :deep(.el-input__wrapper) { min-height: 40px; border-radius: var(--ui-radius-input); } +.query-row :deep(.el-input__wrapper) { min-height: 40px; border-radius: 16px; } .query-actions :deep(.el-button) { min-height: 40px; } .latest-result { display: flex; flex-direction: column; gap: 6px; padding: 15px 0; border-block: 1px solid var(--ui-border); } .latest-result > strong { color: var(--ui-primary); font-size: clamp(25px, 2.4vw, 36px); font-weight: 550; overflow-wrap: anywhere; } diff --git a/web/src/components/commands/CommandChat.vue b/web/src/components/commands/CommandChat.vue index c3c8a524..117c51c3 100644 --- a/web/src/components/commands/CommandChat.vue +++ b/web/src/components/commands/CommandChat.vue @@ -192,7 +192,7 @@ const emit = defineEmits<{ .chat-actions :deep(.el-button span) { display: inline-flex; align-items: center; gap: 6px; } .device-target { width: 220px; min-width: 0; grid-area: device; display: grid; gap: 5px; } .device-label { color: var(--ui-muted); font-size: var(--ui-font-caption); } -.device-target :deep(.el-input__wrapper) { min-height: 36px; border-radius: var(--ui-radius-input); } +.device-target :deep(.el-input__wrapper) { min-height: 36px; border-radius: 16px; } .sync-warning { min-width: 0; margin: 0; diff --git a/web/src/components/commands/CommandComposer.vue b/web/src/components/commands/CommandComposer.vue index d378a1ca..8ff59df1 100644 --- a/web/src/components/commands/CommandComposer.vue +++ b/web/src/components/commands/CommandComposer.vue @@ -156,7 +156,7 @@ function submit() { .quick-list .el-icon { font-size: 14px; } .input-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; } .send-button { width: 44px; height: 40px; padding: 0; border-radius: var(--ui-radius-pill); } -.input-row :deep(.el-input__wrapper) { min-height: 40px; border-radius: var(--ui-radius-input); } +.input-row :deep(.el-input__wrapper) { min-height: 40px; border-radius: 16px; } .suggestions { position: absolute; z-index: 12; diff --git a/web/src/layouts/AuthenticatedShell.vue b/web/src/layouts/AuthenticatedShell.vue index 37c82751..c5b23685 100644 --- a/web/src/layouts/AuthenticatedShell.vue +++ b/web/src/layouts/AuthenticatedShell.vue @@ -312,7 +312,7 @@ const activeMenuItem = computed(() => menuItems.find((item) => item.index === ro min-height: 46px; line-height: 46px; margin: 0 0 5px; - border-radius: var(--ui-radius-nav); + border-radius: 12px; padding-left: 14px !important; padding-right: 14px !important; font-size: 14px; @@ -376,7 +376,7 @@ const activeMenuItem = computed(() => menuItems.find((item) => item.index === ro min-height: 46px; line-height: 46px; margin: 0 auto 5px; - border-radius: var(--ui-radius-nav); + border-radius: 12px; display: grid; place-items: center; padding: 0 !important; diff --git a/web/src/style.css b/web/src/style.css index 1888cede..15ba0874 100644 --- a/web/src/style.css +++ b/web/src/style.css @@ -87,8 +87,10 @@ --el-color-danger-light-8: #F0CBC8; --el-color-danger-light-9: #FDECEC; --el-color-danger-dark-2: #8F1C13; - --el-border-radius-base: 20px; + --el-border-radius-base: 16px; --el-border-radius-small: 16px; + --el-border-radius-round: 16px; + --el-input-border-radius: 16px; --el-border-color: var(--ui-border); --el-border-color-light: var(--ui-border-muted); --el-fill-color-light: var(--ui-surface-muted); @@ -504,16 +506,23 @@ html.dark .el-table td.el-table__cell { box-shadow: none; } +.el-input, +.el-select, +.el-input-number, +.el-date-editor { + --el-input-border-radius: 16px; +} + .el-input__wrapper, .el-select__wrapper, .el-input-number, .el-date-editor { - border-radius: var(--ui-radius-input) !important; + border-radius: 16px !important; box-shadow: 0 0 0 1px var(--ui-border) inset !important; } .el-textarea__inner { - border-radius: var(--ui-radius-input) !important; + border-radius: 24px !important; box-shadow: 0 0 0 1px var(--ui-border) inset !important; } @@ -600,7 +609,7 @@ html.dark .el-table td.el-table__cell { height: 40px; line-height: 40px; margin: 2px 8px; - border-radius: var(--ui-radius-nav); + border-radius: 12px; } .el-menu-item.is-active { diff --git a/web/src/views/Login.vue b/web/src/views/Login.vue index dd423e1a..7b5b12a5 100644 --- a/web/src/views/Login.vue +++ b/web/src/views/Login.vue @@ -535,7 +535,7 @@ label { align-items: center; gap: 10px; border: 1px solid var(--ui-border); - border-radius: var(--ui-radius-input); + border-radius: 16px; background: var(--ui-surface); color: var(--ui-text-muted); transition: border-color 160ms ease, box-shadow 160ms ease; diff --git a/web/tests/themeSource.test.ts b/web/tests/themeSource.test.ts index 27175cdf..3cf63248 100644 --- a/web/tests/themeSource.test.ts +++ b/web/tests/themeSource.test.ts @@ -51,6 +51,9 @@ test('navy-light tokens match the approved palette', () => { assert.match(globalStyles, /:root \{[\s\S]*--ui-font-weight-title: 700;/) assert.match(globalStyles, /:root \{[\s\S]*--ui-shadow-sm: none;/) assert.match(globalStyles, /:root \{[\s\S]*--ui-shadow-md: none;/) + assert.match(globalStyles, /:root \{[\s\S]*--el-border-radius-base: 16px;/) + assert.match(globalStyles, /:root \{[\s\S]*--el-border-radius-small: 16px;/) + assert.match(globalStyles, /:root \{[\s\S]*--el-input-border-radius: 16px;/) assert.match(globalStyles, /:root \{[\s\S]*--el-color-primary: #0B3558;/) assert.doesNotMatch(globalStyles, /:root \{[\s\S]*?--ui-nav: #0B3558;/) assert.doesNotMatch(globalStyles, /:root \{[\s\S]*?--ui-nav-surface: #0B3558;/) @@ -78,8 +81,8 @@ test('classic preserves the previous dark theme tokens', () => { test('primary buttons are navy pills and selected nav uses the accent bar token', () => { assert.match(globalStyles, /\.el-button \{[\s\S]*border-radius: var\(--ui-radius-pill\);/) assert.match(globalStyles, /\.el-button--primary:not\(\.is-plain\):not\(\.is-text\):not\(\.is-link\) \{[\s\S]*var\(--ui-primary-solid\)/) - assert.match(globalStyles, /\.el-input__wrapper,\s*\.el-select__wrapper,\s*\.el-input-number,\s*\.el-date-editor \{\s*border-radius: var\(--ui-radius-input\) !important;/) - assert.match(globalStyles, /\.el-menu-item \{[\s\S]*border-radius: var\(--ui-radius-nav\);/) + assert.match(globalStyles, /\.el-input__wrapper,\s*\.el-select__wrapper,\s*\.el-input-number,\s*\.el-date-editor \{\s*border-radius: 16px !important;/) + assert.match(globalStyles, /\.el-menu-item \{[\s\S]*border-radius: 12px;/) assert.match(globalStyles, /\.el-menu-item\.is-active \{[\s\S]*var\(--ui-selected\)/) assert.match(shell, /--sidebar-menu-active-bg: var\(--ui-selected\);/) assert.match(shell, /background: var\(--ui-accent\);/)