✨ feat(vscode): 代码阅读类块改成属性表并默认折叠,类的说明进「说明」行

This commit is contained in:
cruldra committed 2026-09-25 14:46:33 +08:00
1 parent 3329aca2e1
commit 43323659e1
22 files changed
+580 -121

No files matched your search

@@ -76,12 +76,12 @@ describe('webview 状态', () => {
})
describe('眼下折叠着哪些', () => {
it('没点过:函数块(含方法、嵌套函数)折叠,其余块和属性行展开', () => {
expect([...collapsedIds(BLOCKS, {})].sort()).toEqual(['1', '1.0.0', '2.0'])
it('没点过:函数块(含方法、嵌套函数)、类块折叠,其余块和属性行展开', () => {
expect([...collapsedIds(BLOCKS, {})].sort()).toEqual(['1', '1.0.0', '2', '2.0'])
})
it('点过的按用户的:展开的函数保持展开,折叠的其他块、属性行保持折叠', () => {
const folds = { '1': false, '2': true, '1.0.0': false, [propertyRowId('0', 2)]: true, [propertyRowId('2.0', 1)]: false }
expect([...collapsedIds(BLOCKS, folds)].sort()).toEqual(['0/p2', '2', '2.0'])
it('点过的按用户的:展开的函数、类保持展开,折叠的其他块、属性行保持折叠', () => {
const folds = { '1': false, '2': false, '1.0': true, '1.0.0': false, [propertyRowId('0', 2)]: true, [propertyRowId('2.0', 1)]: false }
expect([...collapsedIds(BLOCKS, folds)].sort()).toEqual(['0/p2', '1.0', '2.0'])
})
})