docbrown/app/javascript
Dmitry Maksyoma f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* Fix Runkit tags not being activated when comment is added

* Runkit tag activation was ran once, on page load. I've changed it to
  run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
  tags. The code didn't take into account that a tag could be already
  processed, and would just crash.

* Fix Runkit tags and add tests

* Add test for previewing article with Runkit tag

* "Fix CodeClimate not finding waitForRunkitAndActivateTags()

* Refactor a test for readability

* Make Rubocop happy

* Improve test for previewing article with Runkit tag

* Use one method for determining active Runkit tags

* Defer loading of JS from embed.runkit.com

* Add utility function dynamicallyLoadScript(url)

* Switch to dynamic loading of Runkit

* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.

* Fix Runkit test

* Remove Runkit script caching in v2 form

* Use <%== instead of .html_safe in v2 form

* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-15 14:27:46 +02:00
..
.storybook Added a theme switcher to Storybook. (#7364) 2020-04-17 10:39:05 -04:00
analytics Move Chart.js to dynamic import (#5576) [deploy] 2020-01-18 20:46:35 -05:00
article-form Fix Runkit tags not being activated when comment is added (#6767) 2020-05-15 14:27:46 +02:00
articles Open in new window properly on ctrl+click etc (#7814) 2020-05-15 14:02:11 +02:00
chat Fix connect runtime error (#7812) 2020-05-13 08:09:24 -04:00
CommentSubscription [deploy] Add comment subscription component to article page (#7205) 2020-05-05 12:50:30 -04:00
common-prop-types Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
contentDisplayPolicy Migrate to streaming app shell via serviceworkers (#5020) [deploy] 2019-12-16 12:21:33 -05:00
crayons Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
githubRepos Refactoring GitHub Repos functionality - step 1 (#7764) 2020-05-12 13:48:19 +02:00
icons [deploy] Add comment subscription component to article page (#7205) 2020-05-05 12:50:30 -04:00
internal [deploy] Update design and functionality of internal/articles (#7517) 2020-04-26 18:27:09 -04:00
leftSidebar Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
listings Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
onboarding [deploy] Add generalized community name and description to onboarding slides (#7725) 2020-05-08 14:45:24 -04:00
organization Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
packs Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
podcasts Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
profileDropdown Chat: Remove Report Button from user's own profile sidebar (#4604) [deploy] 2019-12-02 16:35:47 -05:00
readingList [deploy] Execute Reading List searches in Elasticsearch (#7440) 2020-04-24 10:30:17 -04:00
responseTemplates [deploy] Add a more helpful msg for response templates (#7543) 2020-04-27 13:28:28 -04:00
Search Moved search components our of src/ folder. (#7869) 2020-05-14 16:45:41 -04:00
searchableItemList Fix reading list pagination (#7518) 2020-04-27 09:17:50 -04:00
shared/components [deploy] Add name to tags component (#6802) 2020-04-07 09:50:45 -04:00
sidebar-widget Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
Snackbar Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
src Sanitizing and rendering html entities in article title (#7593) 2020-05-15 08:04:43 -04:00
utilities Request Utility for Frontend (#7317) 2020-04-22 07:58:15 -04:00
.eslintrc.js [deploy] Execute Reading List searches in Elasticsearch (#7440) 2020-04-24 10:30:17 -04:00