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

Variables View: Provide UI for evaluating Promises #419

Open
kevinushey opened this issue Apr 12, 2023 · 1 comment
Open

Variables View: Provide UI for evaluating Promises #419

kevinushey opened this issue Apr 12, 2023 · 1 comment
Labels
area: variables Issues related to Variables category.

Comments

@kevinushey
Copy link
Contributor

R has objects called "promises", which are effectively objects which are evaluated only on first use. In RStudio, we display them like so:

Screenshot 2023-04-12 at 9 59 26 AM

We also allow users to click on a promise to "force" it, and replace it with the underlying evaluated value. We may want to consider a similar feature for Positron.

@kevinushey kevinushey added this to the Public Beta milestone Apr 12, 2023
@jmcphers
Copy link
Collaborator

@kevinushey pointed out on Slack ( https://positpbc.slack.com/archives/C04FPQK3H9C/p1681316371106569 ) that active bindings are similar -- we don't want to trigger their evaluation implicitly, but also want users to be able to trigger them explicitly when they need/want to see the underlying value.

I think we can generalize this a little to avoid having the Environment pane become too knowledgable about R.

  • A variable can list a set of actions that can be performed on it; each action could have a name and optionally a codicon name
  • When we show the variable in the Environment pane, we make the actions it advertises visible somewhere (context menu and/or via icons drawn directly on the row)
  • Invoking the action from the UI would cause a message to be sent to the environment comm with the variable path and the desired action.

@petetronic petetronic changed the title Provide UI for evaluating promises in Environment pane Variables View: Provide UI for evaluating Promises Nov 23, 2023
@wesm wesm added the area: variables Issues related to Variables category. label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: variables Issues related to Variables category.
Projects
None yet
Development

No branches or pull requests

4 participants