mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-09 08:13:29 +08:00
🐛 fix(tabs/query-editor): 优化标签圆角并修复搜索提示遮挡
- 将 V2 工作区标签统一为四角圆角,并让激活色沿圆角自然显示 - 放开 Monaco 查找组件可见时的浮层裁剪,不改变按钮位置和顶部间距 - 补充标签圆角与查找提示显示的回归测试
This commit is contained in:
@@ -11644,13 +11644,17 @@ describe('QueryEditor external SQL save', () => {
|
||||
expect(css).toContain('body[data-ui-version="v2"] .gn-v2-query-results .query-result-tab-text {');
|
||||
});
|
||||
|
||||
it('does not reserve vertical space for the Monaco find widget in the v2 query editor', () => {
|
||||
it('shows Monaco find button hovers without moving the find widget in the v2 query editor', () => {
|
||||
const source = readFileSync(new URL('./QueryEditor.tsx', import.meta.url), 'utf8');
|
||||
const css = readV2ThemeCss();
|
||||
const findWidgetOverflowRule = css.match(
|
||||
/body\[data-ui-version="v2"\] \.gn-v2-query-monaco-stage:has\(\.monaco-editor \.find-widget\.visible:not\(\.hiddenEditor\)\)\s*\{(?<body>[^}]*)\}/s,
|
||||
)?.groups?.body ?? '';
|
||||
|
||||
expect(source).not.toContain('addExtraSpaceOnTop: true');
|
||||
expect(css).not.toContain('body[data-ui-version="v2"] .gn-v2-query-monaco-stage:has(.monaco-editor .find-widget.visible:not(.hiddenEditor)) {');
|
||||
expect(css).not.toContain('padding-top: 24px;');
|
||||
expect(findWidgetOverflowRule).toContain('overflow: visible;');
|
||||
expect(findWidgetOverflowRule).not.toContain('padding-top');
|
||||
expect(findWidgetOverflowRule).not.toContain('top:');
|
||||
expect(css).not.toContain('body[data-ui-version="v2"] .gn-v2-query-monaco-stage .monaco-editor .find-widget {');
|
||||
});
|
||||
|
||||
|
||||
@@ -51,4 +51,16 @@ describe('v2 workbench adaptive tab width', () => {
|
||||
/\.gn-v2-main-tabs \.ant-tabs-tab \{[^}]*width: 260px;[^}]*min-width: 260px;[^}]*max-width: 260px;/s,
|
||||
);
|
||||
});
|
||||
|
||||
it('rounds all four corners of every v2 workbench tab', () => {
|
||||
expect(themeSource).toMatch(
|
||||
/\.gn-v2-main-tabs \.ant-tabs-tab \{[^}]*border-radius: 8px !important;/s,
|
||||
);
|
||||
expect(themeSource).toMatch(
|
||||
/\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active \{[^}]*box-shadow: inset 0 2px 0 var\(--gn-accent\) !important;/s,
|
||||
);
|
||||
expect(themeSource).toMatch(
|
||||
/\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active::after \{[^}]*display: none;/s,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -347,6 +347,10 @@ body[data-ui-version="v2"] .gn-v2-query-monaco-stage {
|
||||
background: var(--gn-bg-panel);
|
||||
}
|
||||
|
||||
body[data-ui-version="v2"] .gn-v2-query-monaco-stage:has(.monaco-editor .find-widget.visible:not(.hiddenEditor)) {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
body[data-ui-version="v2"] .gn-v2-query-monaco-shell {
|
||||
min-height: 0;
|
||||
overflow: visible;
|
||||
|
||||
@@ -3729,6 +3729,15 @@ body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab {
|
||||
height: 36px;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
|
||||
body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab.ant-tabs-tab-active {
|
||||
box-shadow: inset 0 2px 0 var(--gn-accent) !important;
|
||||
}
|
||||
|
||||
body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab.ant-tabs-tab-active::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body[data-ui-version="v2"] .gn-v2-main-tabs-double .ant-tabs-tab {
|
||||
|
||||
Reference in New Issue
Block a user