posit-dev / positron

Positron, a next-generation data science IDE
Other
2.31k stars 68 forks source link

Make the individual projects open in Positron feel more distinct from one another #974

Open jennybc opened 1 year ago

jennybc commented 1 year ago

I mentioned this once in slack and the feeling has only intensified as I use VS Code more: I really prefer the way my individual RStudio Projects feel distinct vs. how the same feels in VS Code.

(1) I think the main thing I notice is how RStudio vs VS Code interacts with macOS app switcher:

Screenshot 2023-08-07 at 3 53 09 PM

This post (https://stackoverflow.com/a/68816831) captures a lot re: why I care about this, even if the mechanics described there sound awful and dated:

In case you are using VS Code for multiple purposes (C#, Python, Database client, etc.), it's useful to separate each one instances in taskbar with different colors and themes.

I think it's possible that data science projects feel more distinct and, therefore, worthy of their own window than, e.g., 3 different software development projects. Imagine you're working on an R package, a Quarto website, a Shiny app, and a data analysis.

Is there any way we can get the same app switcher experience as RStudio?

(2) I think the frame around VS Code windows is also much more subtle than RStudio instances. My VS Code windows feel like an undifferentiated blob of stacked black rectangles and, as I cycle through them, I have to scrutinize a relatively small bit of text in the ?title bar? to figure out which is which. In contrast, when I switch between RStudio projects, I get the app switcher experience, with the project name front and center. Somehow the RStudio experience feels much better.

(3) To go out in a blaze of glory, I'll highlight something from the SO post above:

with different colors and themes

This has been a much-wished for feature for RStudio:

Positron gets project-level theming for free 🎉 because VS Code supports this (these are all positron windows):

Screenshot 2023-08-07 at 4 23 21 PM

So it would be really interesting to think about how to lean into that. For example, having a different default theme for different types of projects? I don't have any desire to manage tons of themes and hand pick one for each project. I'd just like the projects to feel more distinct.

This Peacock extension seems pretty interesting, in terms of the general idea: https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock

Subtly change the color of your Visual Studio Code workspace. Ideal when you have multiple VS Code instances, use VS Live Share, or use VS Code's Remote features, and you want to quickly identify your editor.

jennybc commented 1 year ago

Another interesting extension I learned about from @jmcphers in https://github.com/rstudio/rstudio/issues/4905: https://marketplace.visualstudio.com/items?itemName=stuart.unique-window-colors

jthomasmock commented 11 months ago

Another interesting extension I learned about from @jmcphers in rstudio/rstudio#4905: marketplace.visualstudio.com/items?itemName=stuart.unique-window-colors

I tried to install this, but a) I don't think it's on Open VSX and b) it seems to not be actively maintained 😢 - last commit was 2019-05-06.

However, Peacock is on Open VSX and appears to be maintained.

jennybc commented 11 months ago

Another downside of the VS Code behaviour is how things work when foregrounding one application versus another, i.e. because you want to stare at your IDE and your web browser at the same time. Basically you have to size/move/stack all your current VS Code windows to arrange them favorably for this task vs. only worrying about the target window.

jennybc commented 11 months ago

I was just re-visiting a related Slack thread (https://positpbc.slack.com/archives/C05M2EZCPGR/p1695325958981899) and want to highlight a few launch-ability points made there.

Many of us have ways of launching RStudio in a Project without having to explicitly provide (or even know) the filepath or specifying RStudio:

jthomasmock commented 11 months ago

There is a typical terminal-driven workflow for VS Code:

code ~/some-directory

Which is mimicked in Positron:

positron ~/some-directory
# or
positron . # if already in working directory

That is mimicked into Alfred: https://hartenfeller.dev/blog/alfred-vscode-workflow and Raycast: https://www.raycast.com/shubzkothekar/open-in-visual-studio-code

But all of those assume you already essentially know "where you are going", albeit I'm sure there's still some discoverability via auto-complete or filtering search.

I wonder if you could adjust the Alfred scripts so it could pull/read from the list of recent projects that Positron stores even if they aren't identified with a .PositronProj equivalent.

RE: Mac + Finder, there's a (hacky) solution via Automator: https://stackoverflow.com/questions/64040393/open-a-folder-in-vscode-through-finder-in-macos

Thinking ahead to Posit Workbench, we'll also want to be careful to properly populate recent sessions/projects on the Homepage and allow re-opening them with the appropriate metadata (R vs Python, etc)