Merge the file-icon theme shell from #594 (feat/file-icon-theme)
Brings in the theme plumbing around #531's API — the `fileIconTheme` pref thread, the settings row, the 20 dictionaries' keys and the theme loader's test — so the working tree is a complete, green starting point before the colored implementation is replaced. Conflicts (three; resolved by taking this line's side where it had moved on): - src/client/service.ts: the import block keeps `baseName, extOf` (the `isNarrowWidth` import the theme branch needed belongs to its own fresh-session seeding, which main has since rewritten) and the feature-list doc comment keeps main's "v0.19.0 REMOVED 'floatWindows'" note while adopting the sharper `fileIcons` wording (matched by exts / names / folderNames). - tests/plugin-shape.spec.ts and tests/prefs.spec.ts: main DELETED the store seeding tests these files used to hold and rewrote the schema assertions (the `SIDEBAR_PREFS_DEFAULTS` destructuring), so this line's side wins — the theme branch's re-added blocks describe behaviour main no longer has. Next commit removes `fileIconTheme` again along with the 563-entry dataset and its lazy chunk: DSH 0.1.5-rc.2 exports the official `FileTypeIcon` artwork, so the plugin renders the host's icons instead of shipping its own color table.
This commit is contained in:
@@ -132,9 +132,11 @@ service.openFile({ sessionId: 's1', cwd: '/p' }, '/p/a.csv', 'Data')
|
||||
const icon: FileIconDescriptor = {
|
||||
id: 'my-plugin:icons',
|
||||
exts: ['csv', FOLDER_EXT, FOLDER_OPEN_EXT],
|
||||
names: ['package.json'],
|
||||
folderNames: ['node_modules'],
|
||||
priority: 5,
|
||||
icon: (path: string, size: number) => {
|
||||
void path; void size
|
||||
icon: (path: string, size: number, open?: boolean) => {
|
||||
void path; void size; void open
|
||||
return null
|
||||
},
|
||||
}
|
||||
@@ -142,6 +144,7 @@ service.registerFileIcon(icon)
|
||||
service.getFileIcons()
|
||||
service.matchFileIcon('/p/a.csv')
|
||||
service.matchFolderIcon(true)
|
||||
service.matchFolderIcon(true, 'node_modules')
|
||||
service.fileIcon('/p/a.csv', 14)
|
||||
service.folderIcon('/p', true, 14)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user