Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plots in editor tabs have unsightly GUIDs as names #5872

Open
jmcphers opened this issue Jan 2, 2025 · 2 comments
Open

Plots in editor tabs have unsightly GUIDs as names #5872

jmcphers opened this issue Jan 2, 2025 · 2 comments
Labels
area: plots Issues related to Plots category.

Comments

@jmcphers
Copy link
Collaborator

jmcphers commented Jan 2, 2025

System details:

Positron and OS details:

Positron Version: 2025.01.0 (Universal) build 143
Code - OSS Version: 1.95.0
Commit: 158abd15f5d37c436c46b74e27729613e0776621
Date: 2025-01-02T02:42:53.427Z
Electron: 32.2.1
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

Interpreter details:

Any

Describe the issue:

Plots in editor tabs have unsightly GUIDs as names.

Steps to reproduce the issue:

Create any plot, then open it in an editor. Observe the title of the tab.

Image

This takes up a lot of real estate and isn't meaningful to users.

Expected or desired behavior:

A shorter, more descriptive name. We could do a number of things here; here are some ideas:

  • Use the first few bits of the statement that was executed to produce the plot. e.g. plot(foo).
  • Use a counter in combination with the language name (e.g. "R Plot 1", "Python Plot 4")
  • Delegate the problem; require that the kernel supply a label/name for the plot as part of opening the plot comm. The R and Python kernels could use a strategy like the above and/or something language specific (e.g. introspecting a ggplot object to find its title if one is supplied)

We could also use the short plot names as accessibility labels in the navigation tools in the Plots pane.

Were there any error messages in the UI, Output panel, or Developer Tools console?

No.

@jmcphers jmcphers added the area: plots Issues related to Plots category. label Jan 2, 2025
@ntluong95
Copy link

The third approach looks nice. You can also consider object name as well. For example plot1 <- ggplot()

@timtmok
Copy link
Contributor

timtmok commented Jan 7, 2025

I think it would be nice if the kernel would supply a name but we can fall back on a generic title if one isn't supplied.

@sharon-wang had also brought up visually highlighting the editor tab when you are about to interact with it in the command palette. That would be a nice thing to have but also likely not going to satisfy accessibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: plots Issues related to Plots category.
Projects
None yet
Development

No branches or pull requests

4 participants