mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-12 09:34:05 +08:00
🐛 fix(tabs): 修复短连接标签占用固定间距
- 将连接标签由固定 flex 基准改为按内容宽度收缩 - 保留 92px 最大宽度以避免长连接名称撑开标签 - 增加短连接名称间距回归测试
This commit is contained in:
@@ -310,6 +310,13 @@ describe('TabManager hover info', () => {
|
||||
expect(source).not.toContain('gn-v2-main-tabs-rich');
|
||||
});
|
||||
|
||||
it('keeps short secondary connection labels content-sized', () => {
|
||||
const css = readFileSync(new URL('../v2-theme.css', import.meta.url), 'utf8');
|
||||
|
||||
expect(css).toMatch(/\.gn-v2-tab-label-part-connection \{[^}]*flex: 0 1 auto;[^}]*max-width: 92px;/s);
|
||||
expect(css).not.toMatch(/\.gn-v2-tab-label-part-connection \{[^}]*flex: 0 1 92px;/s);
|
||||
});
|
||||
|
||||
it('wires hover card tab-switch and drag-blocking handlers with selectable text styles', () => {
|
||||
const source = readFileSync(new URL('./TabManager.tsx', import.meta.url), 'utf8');
|
||||
|
||||
|
||||
@@ -3626,7 +3626,8 @@ body[data-ui-version="v2"] .gn-v2-tab-label-part-object {
|
||||
}
|
||||
|
||||
body[data-ui-version="v2"] .gn-v2-tab-label-part-connection {
|
||||
flex: 0 1 92px;
|
||||
flex: 0 1 auto;
|
||||
max-width: 92px;
|
||||
color: var(--gn-fg-2);
|
||||
font-family: var(--gn-font-mono);
|
||||
font-weight: 700;
|
||||
|
||||
Reference in New Issue
Block a user