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

Moved toastService into copy directive #468

Merged
merged 1 commit into from Dec 28, 2017

Conversation

Projects
None yet
2 participants
@ckhatri
Contributor

ckhatri commented Dec 17, 2017

Previously what happened was ng-click -> called copyToClipBoard which always showed a successful toast message.

Passed in the toastService into the copy directive, so now what happens is the toast service will show the correct response.

Partially inspired by a reddit post where the user stated that it would say copied to clipboard but then would not be able to past it.

@alexbarnsley

This comment has been minimized.

Show comment
Hide comment
@alexbarnsley

alexbarnsley Dec 27, 2017

Member

@ckhatri Do you know how to replicate the error toast? I can confirm success is working which is great. If not I will still merge, I just thought I'd test if you did know how to replicate.

Member

alexbarnsley commented Dec 27, 2017

@ckhatri Do you know how to replicate the error toast? I can confirm success is working which is great. If not I will still merge, I just thought I'd test if you did know how to replicate.

@ckhatri

This comment has been minimized.

Show comment
Hide comment
@ckhatri

ckhatri Dec 27, 2017

Contributor

I'm not sure how to force the copy command to fail, but I just changed the code so it would throw, which it then caught and showed the 'fail to copy' toast.

Contributor

ckhatri commented Dec 27, 2017

I'm not sure how to force the copy command to fail, but I just changed the code so it would throw, which it then caught and showed the 'fail to copy' toast.

@alexbarnsley

This comment has been minimized.

Show comment
Hide comment
@alexbarnsley

alexbarnsley Dec 28, 2017

Member

As we have no true way to test a failure for copy & paste, I will go ahead and merge. Copy was still working for me

+5! 👍

Member

alexbarnsley commented Dec 28, 2017

As we have no true way to test a failure for copy & paste, I will go ahead and merge. Copy was still working for me

+5! 👍

@alexbarnsley alexbarnsley merged commit 7afd583 into ArkEcosystem:master Dec 28, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ckhatri ckhatri deleted the ckhatri:copy_fix branch Dec 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment