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

added copy code to clipboard changes #662

Merged
merged 3 commits into from
Apr 28, 2020
Merged

added copy code to clipboard changes #662

merged 3 commits into from
Apr 28, 2020

Conversation

sacgov
Copy link
Contributor

@sacgov sacgov commented Apr 26, 2020

Changes

Added a copy code to clipboard feature and added code highlighting. This is for the Issue.

Couldn't use the copytoclipboard from inviteTeam as that had a textarea to select. This is a pre that has to be copied. Hence used a different approach.

This code adds a lengthy and also looks messy in utils.js which i felt should be comparatively clean and readable and that it was better of without this. So i create a component.

Please leave a comment on any changes required on this one. I'm just getting started on OSS contribution. I would love to incorporate the changes.

Checklist

  • All querysets/queries filter by Team
  • Code reviewed
  • QA'd

@timgl
Copy link
Collaborator

timgl commented Apr 27, 2020

@Sac0 Hi, maybe I'm being silly but I can't see any of the code that does the copy to clipboard in this pull request. Did you maybe forget to commit it?

@sacgov
Copy link
Contributor Author

sacgov commented Apr 27, 2020

Hi @timgl . I'm sorry to have messed up. Actually i had added the whole output from hilite.me in a single line. The linters split it to multiple lines. I also had to check moving to multiple lines didn't mess up with the whitespace. So i was checking if i have to commit the large file and forgot to commit it.

I have also added the steps to regenerate it just in case the script has to be changed.
I can make them more verbose if it needs to be as well.

@timgl
Copy link
Collaborator

timgl commented Apr 28, 2020

This is awesome, thanks for this!

@timgl timgl merged commit 0c521af into PostHog:master Apr 28, 2020
@sacgov sacgov deleted the copy-code-to-clipboard branch April 29, 2020 11:22
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.

None yet

2 participants