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

[ISSUE#1699] Introduce a context menu -> copy JSON in the JSON inspector #1801

merged 5 commits into from Sep 4, 2019


Copy link

denscollo commented Aug 30, 2019

Solves #1699 #1694


Allows the users to copy the activities in JSON format using the "Copy json" button placed in the inspector panel or using the context menu items for the activities in the chat session.

Changes made

  • Add "Copy json" button
  • Add test for context menu displayed for the activities in default mode
  • Enable context menu for activities in default mode
  • Add test when the "Copy json" button is clicked


The next image shows how the "Copy json" button works.

Also, this one shows the context menu enabled for the activities in default mode.


This comment has been minimized.

Copy link

coveralls commented Aug 30, 2019

Coverage Status

Coverage increased (+0.01%) to 65.574% when pulling 7192df8 on add/inspector-copy-json-button into 9e00b1a on master.

Copy link

tonyanziano left a comment

One minor nitpick, but other than that, it looks good.

Nice work!

@@ -365,6 +366,11 @@ export class Inspector extends React.Component<InspectorProps, InspectorState> {

private accessoryClick = (event: MouseEvent<HTMLButtonElement>): void => {
const id =;

if (id == 'copyJson') {
return Electron.clipboard.writeText(JSON.stringify(this.state.inspectObj, null, 2));

This comment has been minimized.

Copy link

tonyanziano Sep 4, 2019


Minor nitpick:

Would prefer if the import statement was:

import { clipboard } from 'electron'

and this line was:

return clipboard.writeText(...)

Copy link

tonyanziano left a comment


@tonyanziano tonyanziano merged commit cc73e75 into master Sep 4, 2019
2 checks passed
2 checks passed
Emulator-CI-PR #77757 succeeded
license/cla All CLA requirements met.
@tonyanziano tonyanziano deleted the add/inspector-copy-json-button branch Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.