microsoft / vscode-makecode

A vscode.dev compatible extension for Microsoft MakeCode
MIT License
35 stars 6 forks source link

Automatically collapse asset panels if the open project has no assets of that type #68

Open riknoll opened 1 year ago

riknoll commented 1 year ago

When we open the asset explorer, we should collapse all of the empty entries to give more room for the asset actions. I'm sure there must be a vscode command for this somewhere.

We should also not expand anything automatically, as that would be annoying. Just collapse the empty ones.

jwunderl commented 1 year ago

I don't think this can be done at the moment; looks like we need https://github.com/microsoft/vscode/issues/88219 for programmatically setting expanded/collapsed state.

My reading is that if we want we could add "visibility": "collapsed" here so that all the {assetType}Explorers start collapsed (& which only sets the default for when first opening workspace / until first interaction by user), but I don't think that's what we want (well, it is, but we would want that to be used here ish https://github.com/microsoft/pxt-vscode-web/blob/main/src/web/jres.ts#L44)