posit-dev / publisher

MIT License
5 stars 0 forks source link

Emphasize the entrypoint in the Project Files tree #2239

Open dotNomad opened 2 months ago

dotNomad commented 2 months ago

Relies on the files API correctly returning isEntrypoint.


There are a few ways we could do this.

Bolding is one option:

Image

but VS Code hardly ever bolds text.

Another is to use list.activeSelectionForeground and potentially list.activeSelectionBackground as well:

Image

the explorer does something similar so this may look like the file is open, or selected in some other way.

VS Code typically uses color over font-weight or other tools to emphasize text so maybe another color could be used. Ideally it would be a VS Code color that themes could change (to avoid light vs dark mode issues)

We could also do something as simple as including it in the details of the tree item:

Image

There are a lot of options.

sagerb commented 2 months ago

I would suggest a combination of the second and third option (different color as well as annotated as the entrypoint). Confusion could occur if the filename contains the word "entrypoint", but the proposal also shows it slightly different than the file name, so I think it would be weird, but minimal there. If this is really an issue, we could try "<-- entrypoint" or something for the annotation.