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

enable contributions for data viewers through notebook variables view #203054

Closed
amunger opened this issue Jan 22, 2024 · 8 comments · Fixed by #206636
Closed

enable contributions for data viewers through notebook variables view #203054

amunger opened this issue Jan 22, 2024 · 8 comments · Fixed by #206636
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-variables verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@amunger
Copy link
Contributor

amunger commented Jan 22, 2024

similar to the 'open in data viewer' command from the jupyter variables view, we should allow extensions to contribute a view for a variables for specific language/types on the built in tree view.

@amunger amunger self-assigned this Jan 22, 2024
@amunger amunger added notebook-variables feature-request Request for new features or functionality labels Jan 22, 2024
@davidanthoff
Copy link
Contributor

That would essentially be number 6 in this screenshot from the Julia extension #165445 (comment), right?

@amunger
Copy link
Contributor Author

amunger commented Feb 1, 2024

Same idea, either with an icon like that or through the context menu on that item. In the jupyter extension's case, we are planning to allow contributions for data viewers from extensions that didn't necessarily provide the variables.

@davidanthoff
Copy link
Contributor

Cool. I think icon and context menu would be great ;)

It might also make sense to think a bit ahead there: there are probably some kind of viewers that are relevant for a lot of languages (tabular data, plots) and others that are very language specific. From our end, we would love it if VS Code at some point gained a generic tabular viewer, and a plot viewer that we could utilize and get rid of our custom implementations as well :) So maybe some kind of API design where in the future one could hook into a as of yet not existing generic tabular/plot viewer.

@amunger
Copy link
Contributor Author

amunger commented Feb 13, 2024

Example implementation here https://github.com/microsoft/vscode-extension-samples/tree/aamunger/notebookVariableCommand/notebook-variable-visualizer

The menu contribution point name will likely change names when we expand the usage beyond notebooks, but any needed migration will be pretty straight forward.

@amunger amunger added this to the February 2024 milestone Feb 14, 2024
@amunger amunger closed this as completed Feb 14, 2024
@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Feb 19, 2024
@DonJayamanne DonJayamanne added the verification-steps-needed Steps to verify are needed for verification label Feb 21, 2024
@DonJayamanne
Copy link
Contributor

@amunger I created a sample extension and cannot see any variables showing up.
Do I need to enable something in VS Code for this feature to work.
I couldn't find any settings/experiments that had to be enabled for this.

@DonJayamanne
Copy link
Contributor

Found that I needed to enable a VS Code experiment (I was looking for Jupyter experiments).
Not sure the API is useful in its current form.
Currently when i create a viewer for DataFrames, lists, objects, anything
I do not get the name of the variable.
Hence I have no idea what I'm looking at, all I get is a value, and thats basically a stringified version of the value.

Thus its not really possible to create any viewer, unless of course I'm missing something here.

@DonJayamanne DonJayamanne reopened this Feb 22, 2024
@rzhao271 rzhao271 modified the milestones: February 2024, March 2024 Feb 22, 2024
@rzhao271
Copy link
Contributor

rzhao271 commented Feb 22, 2024

Moving to March for now. Feel free to move back to February if the issue has been verified or once steps are provided and the issue is verifiable in the latest Insiders.

Edit: I confirmed using the sample extension that the viewer does not report the variable name.

@amunger amunger removed verification-needed Verification of issue is requested verification-steps-needed Steps to verify are needed for verification labels Feb 29, 2024
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 1, 2024
@amunger amunger added the verification-needed Verification of issue is requested label Mar 23, 2024
@amunger
Copy link
Contributor Author

amunger commented Mar 23, 2024

verification:

  1. make sure you have jupyter and python extensions enabled
  2. enable the notebook variable view "notebook.experimental.variablesView": true
  3. use the sample extension or create your own
  4. run some notebook cells that create variables and open the debug sidebar to see the notebook variable view
  5. ensure that the command contributed to the notebook/variables/context menu is provided information about the variable (expression should be the expression that would access that variable)

@roblourens roblourens added the verified Verification succeeded label Mar 26, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-variables verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants