Commit Graph

4 Commits

Author SHA1 Message Date
Sai Grandhi d7f671135c Update copyToClipBoard.js
Summary:
Since copy to clipboard functionality is now available in Linux, the comment above `copyToClipboard` function has been updated.
Closes https://github.com/facebook/react-native/pull/14773

Differential Revision: D5392372

Pulled By: hramos

fbshipit-source-id: 6e2668e1a89d37f9d5707fa36b3639895cd5bffd
2017-07-10 15:22:50 -07:00
Sai Grandhi 0fe0fc038b Make copy button work on android emulator in Linux using xsel
Summary:
Resolves issue [#13165](https://github.com/facebook/react-native/issues/13165). The copy button in the redbox for RN android is not currently supported for Linux. This pull request provides the copy button functionality to Linux RN users.

I have tested the updated code locally.
Firstly, I edited `index.android.js` that caused the following error.
![pasted image at 2017_03_27 10_21 am](https://cloud.githubusercontent.com/assets/22376429/24426834/f567c5dc-13d6-11e7-8e3b-a650e2f6237c.png)
After I clicked the copy button and pasted from the clipboard into the chrome address bar, the message appeared.
![pasted_image_at_2017_03_27_10_21_am](https://cloud.githubusercontent.com/assets/22376429/24426896/2c0d4d64-13d7-11e7-8650-da19c44b177d.png)
Closes https://github.com/facebook/react-native/pull/13188

Differential Revision: D4819796

Pulled By: ericvicenti

fbshipit-source-id: 9adc6e93330f89240a505a403e4913dc10e5a31f
2017-04-04 10:20:19 -07:00
Janic Duplessis 10a29aa954 Support copy to clipboard on Windows
Summary:
Also fix lint errors about Buffer being undefined by adding env: node to the eslint config for local-cli.

Tested on windows 10.
Closes https://github.com/facebook/react-native/pull/11959

Differential Revision: D4438903

Pulled By: hramos

fbshipit-source-id: 28d5edd662dd1e63dedf1274ff0a21af4df84f5e
2017-01-19 16:28:39 -08:00
Siqi Liu dc3fce06ea Add Copy and Dismiss Button in RN Android Red Box
Summary:
Add "Copy" and "Dismiss" button when the RN Android redbox is shown, consistent with that in RN iOS.
  - "Copy" button copies all the messages shown in the redbox to the host system clipboard, the solution is posting redbox messages to packager and the the packager copies the messages onto the host clipboard.
  - "Dismiss" button always exits the redbox dialog.
  - Add shortcut as "Dismiss (ESC)" and "Reload (R, R).

Notice: Copy button is only supported on Mac OS by now (warning in packager on other platforms), because it's not easy for us to test on Windows or Linux. Will put the codes for other platforms on Github issues, hoping anyone could help test and add this feature, then send us a pull request.

Redbox Dialog in RN Android before:
{F61310489}
Redbox Dialog in RN Android now:
{F61659189}

Follow-up:
- We can adjust the button styles in redboxes.
- We can consider to add shortcut for "Copy" button.

Reviewed By: foghina

Differential Revision: D3392155

fbshipit-source-id: fc5dc2186718cac8706fb3c17d336160e61e3f4e
2016-06-30 08:13:22 -07:00