Register loading icon for async tree by IllusionMH · Pull Request #95885 · microsoft/vscode

@IllusionMH

This PR fixes #95878

I haven't found easy way to reference icon class for toggling expect to create common method which will be compatible with toggleClass. Other option would be to manually put whole class name or 'codicon-' + Codicon.icon.id (which looks even worse).

Moved icons to separate file to ensure that order won't depend on imports order and made is similar to searchIcons.ts

/cc @aeschli

@IllusionMH

@aeschli

@IllusionMH Thanks for jumping on it, I already started working on a solution where there's only one icon set at a time (the order in css should never matter)

@aeschli

@aeschli

@IllusionMH

I was thinking about this approach but wouldn't it also remove codicon class from element?

@aeschli

Yes, but it's added again if needed for the twisty.

@aeschli

I created #95915 for a fix to avoid depending on the definition order

@aeschli

it also remove codicon class from element

Oh, I see, that can happen when the twisty class name is removed.

Let's see if #95915 goes through, otherwise I fix it

@IllusionMH

Oh I see, this approach should work because of later classes change in abstractTree, but not in general case.

Thanks for review and update!