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

Adds UI to open Data Explorer files as plaintext #6132

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

samclark2015
Copy link
Contributor

@samclark2015 samclark2015 commented Jan 27, 2025

Adds UI affordance in Data Explorer toolbar to open as text file. The button is available only when *.[csv/tsv] files are open (and disabled when binary files or runtime variables are displayed).

Addresses #5206

e2e: @:data-explorer

Release Notes

New Features

  • Adds UI affordance in Data Explorer toolbar to open as text file

Bug Fixes

  • N/A

QA Notes

Updated existing Data Explorer e2e tests to ensure button is visible when feature is available, and hidden when not. Also added tests to ensure the correct file is opened in a text editor when action is invoked.

@samclark2015 samclark2015 self-assigned this Jan 27, 2025
Copy link

github-actions bot commented Jan 27, 2025

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

readme  valid tags

@wesm
Copy link
Contributor

wesm commented Jan 27, 2025

I didn't review the code itself, but the feature works well here for a CSV file

image

There's a bit of a quirk when the the button is disabled -- it still has a hover state that makes it look clickable even though the text is grayed out:

image

I also noticed that this button is visible for the data explorer even when it isn't the headless/DuckDB variety. How hard to you think it would be to hide this button altogether when it isn't applicable? For example, this button would never be usable by a data explorer originating from an R or Python kernel session

@samclark2015
Copy link
Contributor Author

Thanks for the feedback!! I just pushed a change so the button is indeed hidden when unavailable.

Re. the hover state quirk: I imagine this is resolved with the above change, but curious how you got the buttons on the left. My default editor config displays them on the right of the action bar:
Screenshot 2025-01-27 at 3 20 26 PM

@wesm
Copy link
Contributor

wesm commented Jan 27, 2025

I think it's just because I had the Action Bar enabled, if you run the Toggle Action Bar command, the action bar buttons move from the right side as small buttons to a dedicated row with the text beside them

@samclark2015 samclark2015 marked this pull request as ready for review January 28, 2025 17:10
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.

2 participants