posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 91 forks source link

Improve handling of long paths in workspace switcher dropdown #5301

Open juliasilge opened 2 weeks ago

juliasilge commented 2 weeks ago

Originally posted by @ariebh in https://github.com/posit-dev/positron/discussions/5287:

It can be difficult to identify projects in the recently used section of the project menu when it is stored at a location with a long path. The width of the menu restricts how much of the path can be displayed, cutting of the project's enclosing folder.

I'll often see something like this C:\Users\Username\Documents\a\very\long\path\to\the... when attemting to access a project at C:\Users\Username\Documents\a\very\long\path\to\the\project\project-name. Truncating the path from the start rather than the end would improve this. ...\path\to\the\project\project-name

Preferred behaviour would be closer to that of the project menu in RStudio. In RStudio, recent items are displayed using project names, with paths shown only if there is a naming conflict in menu.

I'm unsure if this has already been discussed, or if I should create an issue for this.

juliasilge commented 2 weeks ago

If you have a really long path in the workspace switcher dropdown, you can't see the end of the path:

Image

We handle this better currently on the welcome page, where you can see the last piece of the path i.e. the workspace name:

Image

I personally like how macOS deals with very long directory names in the Finder, showing both the beginning and end of the path:

Image