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

feat: Copy to clipboard doesn't work #504

Open
JCripe-AuthorSolutions opened this issue Mar 28, 2024 · 1 comment
Open

feat: Copy to clipboard doesn't work #504

JCripe-AuthorSolutions opened this issue Mar 28, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@JCripe-AuthorSolutions
Copy link

Summary

Right clicking on a log analysis line shows "Copy Ctrl+C, ...," but using "Copy" doesn't work. No log contents are put in the clipboard.
Also, the "Cut" and "Paste" options are shown improperly, as they won't function in this context.

Steps To Reproduce

  1. Run the Apex Log Analyzer on a debug log file.
  2. Click on a line in the log analyzer output to select it, and right click on the selection, and choose "Copy Ctrl+C" or do Ctrl-C directly.
  3. Try to paste the clipboard contents to another document, only to find the contents pasted aren't from the log analysis, so the copy operation failed silently.

Expected result

The clipboard should have been loaded with the selected text for pasting.

Actual result

The clipboard contents are old, not replaced with the selected log analyzer line text.

Additional information

Feel free to attach a screenshot.

VS Code Version: v1.14.1

Log Analyzer Extension Version: v1.14.1

OS and version: Windows 10 Enterprise, version 10.0.19045 Build 19045

@JCripe-AuthorSolutions JCripe-AuthorSolutions added bug Something isn't working needs-triage labels Mar 28, 2024
@lcottercertinia
Copy link
Collaborator

Thanks for the report.
The cut, copy, paste context menu is provided by vscode and has default behaviour.
We have limited control over it but we can remove the context menu altogether or hide it in certain situations.
But it does have default behaviour and copies selected text so can be useful in some limited situations.

This is not really a bug but it is a feature gap, we need to handle copy and paste application wide, so I will turn this in a feature and get it targeted to a release.

There is a slight work around for copying text from the grids. You can selected some text with mouse down and then use CMD/ CTRL + C to copy BEFORE releasing mouse down.

If any of the tables have focus CTRL/ CMD+C will copy the full table content to the clipboard, but honestly it is a bit clunky.

Changes
I would suggest a bunch of changes to make copy nicer to use, feedback would be appreciated.

  1. Copy should generally work like the browser (right click will select the highlight word).
  2. Move the Export to CSV from table header menu to dedicated button .
  3. Add a copy to clipboard button for the whole table content.
  4. Allowing copying from the cells in the table (maybe similar to excel, right click will select the whole cel , double click to enter and edit state to select sub set of the text)

Let me know if you have other ideas and thought and I will add them to this 👍🏻

@lcottercertinia lcottercertinia added enhancement New feature or request and removed bug Something isn't working needs-triage labels Apr 2, 2024
@lcottercertinia lcottercertinia changed the title bug: Copy to clipboard doesn't work feat: Copy to clipboard doesn't work Apr 2, 2024
@lcottercertinia lcottercertinia added this to the v1.18.0 milestone Apr 2, 2024
@lcottercertinia lcottercertinia modified the milestone: v1.18.0 May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants