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

Export to paste buffer #2982

Closed
philrz opened this issue Jan 21, 2024 · 1 comment · Fixed by #2985
Closed

Export to paste buffer #2982

philrz opened this issue Jan 21, 2024 · 1 comment · Fixed by #2985

Comments

@philrz
Copy link
Contributor

philrz commented Jan 21, 2024

tl;dr

To make it even easier to share data from Zui with other tools, we could add a feature to allow Export directly to the paste buffer.

Details

At the time this issue is being filed, Zui is at commit e275ddd.

In a recent community Slack message, a user said the following:

i have been running zui events and taking the export csv for now to do the comparisons with filters at the spreadsheet level. eventually i will get smart enough to use the zed language more effectively

While we definitely want users to learn the Zed language and be as productive as possible within the app itself, there will inevitably be times it makes sense for users to take the data from Zui into other tools, so we'd like to make it as easy as possible for them to do that. Thinking specifically about spreadsheets, when we recently added TSV import/export options, spreadsheet tools were a big motivator since our community users helped make us aware how cut & paste in/out of those tools is TSV-based.

Right now a user can use the existing Export feature to put TSV into a file, then import that file into the spreadsheet tool or cut & paste its contents once the file is created. However, seeing the user's message made me realize we could save them even more clicks if Zui's Export feature had a way to send data directly into the paste buffer.

Just to brainstorm ideas, one approach might be to add an additional button to the Export Results pop-up, e.g., change the current Export button to Export to File and add a new Export to Paste Buffer button.

image

As @jameskerr is currently putting in a shortcut for opening the Export Results pop-up (#2979), another fancy variation comes to mind: Perhaps the app could cache the last selected format from the Export Results pop-up, which would then allow us to offer a shortcut that would bring the current query results into the paste buffer in that last-selected format without even having to pause and click at the Export Results pop-up.

@philrz
Copy link
Contributor Author

philrz commented Feb 22, 2024

Verified in Zui commit 1365bbd.

As shown in the attached video, clicking Export now offers a Copy to Clipboard button that's an alternative to the export-to-file we've always had and the new export-to-pool option that was also added. What's shown here is export in TSV format for immediate paste into a spreadsheet tool such as the community user originally requested. There's also a keyboard shortcut for bringing up Export, a keyboard shortcut for selecting the Copy to Clipboard option, and Esc can always be hit to dismiss the Export modal, so if users are doing frequent exports to the paste buffer this also offers them a keyboard-centric approach.

Verify.mp4

Thanks @jameskerr!

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

Successfully merging a pull request may close this issue.

1 participant