Skip to content

data explorer: create "Copy as Code" modal #8537

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

Draft
wants to merge 4 commits into
base: copy-as-code-comms
Choose a base branch
from

Conversation

isabelizimm
Copy link
Contributor

@isabelizimm isabelizimm commented Jul 15, 2025

This is building off the copy-as-code-comms branch from #8536 for ease of review.

This PR implements the actions and modal dialog for the Copy as Code data explorer button.

A modal dialog was chosen over a modal popup since we cannot use a modal popup in the editor action bar at this point in time. Notes from @dhruvisompura:

The data explorer UI doesn't have the action bar component we created because it lives in its own row below the VS Code editor action bar (the one that every editor tab has).
We have to contribute all of our buttons via a command for them to show up in that editor action bar.
There currently is no mechanism to show a popup that is anchored to the copy button via an action because commands have no way of knowing what element to anchor a piece of UI to.

Note that this is just the first implementation! Things like the "Copy to Clipboard" functionality, real code editor block, etc will come in a follow up PR.

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

Intended behavior is that the modal has a dropdown that is populated with either "No available syntaxes." or the name of a syntax, eg, pandas, + generated code. At this point, the code generation piece is not implemented, so we won't have to check the code is correct (yet).

On the Python side, a pandas dataframe will fill the dropdown with pandas. A polars dataframe will fill the dropdown with polars. For the R side, the dropdown should say No available syntaxes.

Screen.Recording.2025-07-15.at.5.43.01.PM.mov

Copy link

github-actions bot commented Jul 15, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant