microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

Change the 0-3 status bar icons to a single persistent icon? #4117

Open sean-mcmanus opened 5 years ago

sean-mcmanus commented 5 years ago

This is a proposal to combine the search, flame, and database icons into a single icon that always appears (i.e. a general cpptools icon). The icon would change its image and/or color depending on the work that is occurring • No “long running” tasks, i.e. idle or processing quick tasks. • Only low priority “background work” (workspace symbol parsing). Operations may be missing symbols in this state. Similar to the database icon currently. • High priority “blocking” work (i.e. recursive includes tag parsing, IntelliSense parsing, or Find All References). Operations may be stuck “loading”, give stale results, or fallback to “tag parser” in this state. Similar to the search and flame icons currently.

Clicking the single icon would popup multiple progress UIs for every task that is running (tag parsing, IntelliSense parsing, Find All Refs, etc.) as well as show a list of valid/useful C++ commands applicable to the current state. This would be similar to clicking the bottom left icon in VS for background tasks.

One issue is that the available status bar icons is very limited, so maybe we could get VS Code to add more or add an API for contributing our own icons?

Here’s one possibility using the existing “issues” icons (with potentially green or white, red, yellow coloring?)…the available list is https://code.visualstudio.com/api/references/icons-in-labels :

image

This would solve multiple problems: • The search icon for Find All References is not clickable after it’s done, so it makes post-op filtering difficult. Other post-op commands for configuring tag parsing or IntelliSense might also be useful. • The flame/database icons appearing/disappearing can cause users to accidentally click the wrong icon when they attempt to click the search icon. • The red flame icon looks strange now in Insiders. • The red flame and database icons don’t currently have a progress UI like the Find All References does, so the operations are not easily cancelable and progress is harder to monitor for users who want to see it, although this could be added to the existing icons. • It would allow us to add more progress indication for additional tasks without adding more icons, such as tag parsing caused by opening a file, which currently either shows nothing or shows the red flame (in the recursive includes case).

sean-mcmanus commented 3 years ago

I'm adding two more "icon states" -- ParsingFile and RunningCodeAnalysis -- but they're reusing the existing database and flame icons instead of increasing the status icons by 2 (it's hard to choose 2 new icons) and instead of implementing this feature to reduce the 3 icons to 1 icon, which would be more work and involve a UI change. If this feature were implemented in the future, it would be good to add a setting to toggle between the icon modes.