feat(sidebar): show connection note next to label with tight comment spacing

This commit is contained in:
t8y2 committed 2026-08-06 02:11:02 +08:00
1 parent 67e6b3f32d
commit 9dbbfb4a06
9 files changed
+37 -17

No files matched your search

+4 -2
View File
@@ -14,8 +14,10 @@ test("Nacos namespace rows can show the pin action", () => {
assert.equal(canTreeNodePin("nacos-namespace"), true);
});
test("labels with trailing comments consume the available row width", () => {
assert.equal(treeLabelWidthClass({ fullWidth: false, hasTrailingComment: true }), "min-w-0 flex-1 truncate");
test("labels with trailing comments consume the available row width when aligned", () => {
assert.equal(treeLabelWidthClass({ fullWidth: false, hasTrailingComment: true, alignLeading: true }), "min-w-0 flex-1 truncate");
// inline/right 模式 label 不撑满,让 comment 紧跟
assert.equal(treeLabelWidthClass({ fullWidth: false, hasTrailingComment: true, alignLeading: false }), "min-w-0 shrink truncate");
assert.equal(treeLabelWidthClass({ fullWidth: false, hasTrailingComment: false }), "min-w-0 truncate");
});