You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by AhyoungRyu <gi...@git.apache.org> on 2016/12/13 05:56:11 UTC
[GitHub] zeppelin pull request #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to...
GitHub user AhyoungRyu opened a pull request:
https://github.com/apache/zeppelin/pull/1750
[ZEPPELIN-1796] Add 'copy to clipboard' next to the paragraph id
### What is this PR for?
There are lots of use cases that need to know each `Paragraph Id` in Zeppelin.
e.g. [run paragraph using rest api](https://zeppelin.apache.org/docs/0.7.0-SNAPSHOT/rest-api/rest-notebook.html#run-a-paragraph-asynchronously) / [`z.angularBind`](https://zeppelin.apache.org/docs/0.7.0-SNAPSHOT/displaysystem/front-end-angular.html#basic-usage) / [export paragraphs using iframe](https://zeppelin.apache.org/docs/0.7.0-SNAPSHOT/manual/publish.html) ...
So I added `Copy to clipboard` btn next the each `Paragraph Id` under paragraph setting menu using [angular-zeroclipboard](https://github.com/lisposter/angular-zeroclipboard).
It'll be useful even if it's small feature :)
### What type of PR is it?
Improvement | Feature
### Todos
* [ ] - Task
### What is the Jira issue?
[ZEPPELIN-1796](https://issues.apache.org/jira/browse/ZEPPELIN-1796)
### How should this be tested?
1. `npm run build` under `zeppelin-web/`
2. `npm run start` to start dev mode and browse `http://localhost:9000`
3. click gear icon placed top of the each paragraph -> there must be <img width="20px" alt="screen shot 2016-12-13 at 2 43 49 pm" src="https://cloud.githubusercontent.com/assets/10060731/21129033/96e56ec4-c142-11e6-9ffd-af75007e1f92.png"> btn next to the paragraph id
4. click that button and paste the paragraph id anywhere to check it's copied well or not
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/AhyoungRyu/zeppelin add/copyToClipboard
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/1750.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1750
----
commit a01cc4ad342f46b05da547e7f0a7a84a00973093
Author: AhyoungRyu <fb...@hanmail.net>
Date: 2016-12-13T05:26:18Z
Add 'copy to clipboard' next to the paragraph id
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:
https://github.com/apache/zeppelin/pull/1750
CI has passed now. Ready to review again :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:
https://github.com/apache/zeppelin/pull/1750
Great but the concerns are with dependencies on Flash with this approach
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:
https://github.com/apache/zeppelin/pull/1750
@felixcheung Yeah that's my plan :D
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:
https://github.com/apache/zeppelin/pull/1750
Will merge into master if there are no more comments then
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:
https://github.com/apache/zeppelin/pull/1750
@felixcheung
I just tested this patch only in dev mode(`npm run start`). But after I checked at `localhost:8080` and found
```
404 http://localhost:8080/bower_components/zeroclipboard/dist/ZeroClipboard.swf
```
So I fixed it in here: [616b743](https://github.com/apache/zeppelin/pull/1750/commits/616b743019fe10c45a4693565e1d2c18dcd060fb). There won't be `ZeroClipboard.swf` loading issue anymore.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:
https://github.com/apache/zeppelin/pull/1750
For the consistency with other menus in the dropdown menu, I removed the clippy icon and make paragraph id text itself as a button.

---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/1750
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:
https://github.com/apache/zeppelin/pull/1750
LGTM!
Maybe we can leverage this for more copy to clipboard features?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1750: [ZEPPELIN-1796] Add 'copy to clipboard' next to the pa...
Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:
https://github.com/apache/zeppelin/pull/1750
@felixcheung Yeah you're right. So I changed the library from `angular-zeroclipboard` to [ngclipboard](https://github.com/sachinchoolur/ngclipboard/) which is not using flash. It says
>Angularjs directive for [clipboard.js](https://clipboardjs.com/). A modern approach to copy text to clipboard without using flash.
And I checked it works well in `Chrome` / `Firefox` / `Safari`.
Thanks for letting me know :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---