mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-22 08:53:46 +08:00
🐛 fix(query-editor): 修复大字号表候选下划线裁剪
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
migrateLegacySqlEditorTypographySettings,
|
||||
resolveSqlEditorFontSize,
|
||||
resolveSqlEditorSuggestionLayout,
|
||||
sanitizeSqlEditorTypographySettings,
|
||||
} from './sqlEditorTypography';
|
||||
|
||||
@@ -39,4 +40,22 @@ describe('SQL editor typography', () => {
|
||||
sqlEditorFontSizeFollowGlobal: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('keeps default completion rows unchanged and grows the table-name row for large fonts', () => {
|
||||
expect(resolveSqlEditorSuggestionLayout(13)).toEqual({
|
||||
nameLineHeight: 18,
|
||||
commentLineHeight: 18,
|
||||
rowHeight: 36,
|
||||
});
|
||||
expect(resolveSqlEditorSuggestionLayout(18)).toEqual({
|
||||
nameLineHeight: 25,
|
||||
commentLineHeight: 18,
|
||||
rowHeight: 43,
|
||||
});
|
||||
expect(resolveSqlEditorSuggestionLayout(20)).toEqual({
|
||||
nameLineHeight: 28,
|
||||
commentLineHeight: 18,
|
||||
rowHeight: 46,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user