docbrown/app/views/comments
Nizar 7058d628af
Added Copy Permalink Functionality to Comment Dropdown (#8311)
* Added Copy Permalink Functionality to Comment Dropdown

Copy functionality is similar to the way 'copy article link' is implemented. It checks for the android bridge first, then the navigator, then fallsback to the default document copy command

Since the codes were really similar, I moved the copy functionality to a function of its own with callbacks and fallbacks as lambdas, and triggered it with the copyArticleLink and the copyPermalink

* Replaced Copy Permalink Callbacks with Promises

* Keep anchor tags instead of buttons (#1)

* copy permalink using anchor tag

* Missing closing button tag

* Adds 'Copied to Clipboard' Snackbar Message

* Patches bug introduced in #10323

Patch suggested in following comment: https://github.com/forem/forem/pull/8311\#pullrequestreview-492011202

* Removes import statement for addSnackbarItem and Suppresses ESLint Error

Initializer runs in global scope

* Unhandles exception when copying permalink so Honeybadger can handle it

* Replaces ButtonListener suffix for copyPermalink method with Listener

Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2020-11-11 08:32:10 -05:00
..
_comment.html.erb Hide comment feature (#4944) 2019-12-10 15:09:47 -05:00
_comment.json.jbuilder [deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263) 2020-09-09 15:33:13 -04:00
_comment_date.erb Show localized date/time on hover for articles/comments (#2722) 2019-05-09 11:05:17 -04:00
_comment_proper.html.erb Added Copy Permalink Functionality to Comment Dropdown (#8311) 2020-11-11 08:32:10 -05:00
_form.html.erb Wrap siteconfig images in optimizer (#11276) 2020-11-05 12:35:07 -05:00
_liquid.html.erb Remove social icons from comment liquid tag (#11186) 2020-11-02 09:57:08 -05:00
delete_confirm.html.erb Deprecate old button stylings with Crayons buttons (#10694) [deploy] 2020-10-14 07:28:41 -07:00
deleted_commentable_comment.html.erb [deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263) 2020-09-09 15:33:13 -04:00
edit.html.erb [deploy] Redesigned Comment Form (#10355) 2020-10-05 12:01:48 +02:00
index.html.erb fix for code fullscreen action on comment page (#11224) 2020-11-02 10:57:45 +01:00
index.json.jbuilder Initial commit 2018-02-28 16:11:08 -05:00
new.html.erb Fix linting issues in app/views/comments (#1853) [ci skip] 2019-02-25 13:03:31 -05:00
settings.html.erb Deprecate old button stylings with Crayons buttons (#10694) [deploy] 2020-10-14 07:28:41 -07:00