docbrown/app/views
Jacob Herrington 3e99fb527f Add StimulusJS and Refactor Internal article_script (#5539) deploy]
* Add StimulusJS 1.1.1

Because:
- Internal will likely need more interactivity going forward
- Vanilla JS and jQuery are great, but aren't quite as organized as we
might like
- Stimulus fits our model of what internal should be (imo)
- Adopting Preact or something with templating would require rewriting a
bunch of erb (that is currently working just fine)

Stimulus is a JavaScript framework that directly compliments turbolinks
and the approach vanilla Rails takes to JavaScript. I've set it up to
specifically be used in the internal views where we are currently using
jQuery and vanilla JS. I think we should chip away at the vanilla JS
currently in place with this, which appears to be both scalable and
pragmatic exactly the sort of tool we want for building our internal
tools.

* Replace crufty article JS with Stimulus

I'm swapping out some of the stuff going on in article_script.erb with
some StimulusJS, it seems like a good test case for Stimulus.

This lets us organize the code a little more intentionally and hopefully
fixes a small performance complaint that Michael had.

* Rename uncommunicative methods

* Add unit tests for Stimulus classes

* Move Stimulus code to javascript/internal
2020-01-24 16:00:24 -05:00
..
additional_content_boxes Fix (some) n+1/eager loading issues (#5294) [deploy] 2020-01-08 18:48:24 -05:00
admin/application Last general linting sweep (#1947) 2019-03-02 07:47:14 -08:00
api/v0 Comments API: fix caching issues (#4744) [deploy] 2020-01-15 10:45:56 -05:00
articles Remove unnecessary heroku slug commit values in cache keys (#5524) 2020-01-15 12:35:16 -05:00
badges Added title attribute for Badges (#5201) 2019-12-27 10:40:29 -05:00
blocks Add SRI to script tags where applicable (#2153) 2019-03-22 14:14:59 -04:00
chat_channels Add conditional to prevent superfluous rerenders in chat compose (#5705) [deploy] 2020-01-24 11:23:48 -05:00
classified_listings Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
comments Don't raise StandardError for invalid liquid tags when updating comment (#5694) 2020-01-24 11:26:55 -05:00
credits Add new font and theme config, plus new navbar config option (#4462) 2019-10-24 08:38:46 -04:00
dashboards Add pagination to followers and following page in dashboard (#258) (#4375) [deploy] 2019-11-20 18:21:18 -05:00
devise Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
doorkeeper add styling for oauth page (#4108) 2019-09-25 12:00:45 -07:00
downloads Add android and ios apps download page (#3736) (#3798) 2019-08-22 21:04:58 -04:00
email_subscriptions Fix linting issues in app/views/email_subscriptions (#1859) [ci skip] 2019-02-25 12:50:41 -05:00
events Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
feedback_messages Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
fields Add alternative texts to images (#2771) [ci skip] 2019-05-09 11:16:03 -04:00
history Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
homepage Stories views reorganization (#1317) 2018-12-13 14:54:02 -05:00
html_variants Add lazy loading to iframes (#4673) 2019-11-18 18:31:56 -05:00
internal Add StimulusJS and Refactor Internal article_script (#5539) deploy] 2020-01-24 16:00:24 -05:00
layouts Add StimulusJS and Refactor Internal article_script (#5539) deploy] 2020-01-24 16:00:24 -05:00
liquid_embeds replace DEPLOYMENT_SIGNATURE with HEROKU_SLUG_COMMIT to bust caches on deploy (#4950) [deploy] 2019-12-02 12:51:04 -05:00
liquids Implement GitPitchTag (#4942) 2019-12-19 19:59:15 -05:00
mailers Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
moderations ActiveRecord count optimizations (#5478) [deploy] 2020-01-14 12:03:38 -05:00
notifications Remove notifiable access from articles and comments notifications (#5415) [deploy] 2020-01-09 10:19:45 -05:00
organizations Fix encoding of special characters on organization page rendering (#3944) 2019-09-09 14:13:23 -04:00
pages Update settings links + descriptions in editor guide (#5473) 2020-01-15 16:37:35 -05:00
partnerships ActiveRecord count optimizations (#5478) [deploy] 2020-01-14 12:03:38 -05:00
podcast_episodes Fix podcast NaN time issue (#5513) [deploy] 2020-01-14 15:30:11 -05:00
podcasts Creating podcasts by users (#3730) [deploy] 2020-01-08 16:14:25 -05:00
pro_memberships replace DEPLOYMENT_SIGNATURE with HEROKU_SLUG_COMMIT to bust caches on deploy (#4950) [deploy] 2019-12-02 12:51:04 -05:00
reading_list_items History and reading list refactoring (#3338) 2019-07-02 09:22:21 -04:00
service_worker Change font size for search and message input (#5572) [deploy] 2020-01-18 14:53:54 -05:00
shared Add SRI Support (#4658) [deploy] 2019-12-06 08:35:37 -05:00
shell Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
social_previews Improve twitter card caching (#5206) [deploy] 2019-12-23 12:22:38 -05:00
stories Remove unnecessary heroku slug commit values in cache keys (#5524) 2020-01-15 12:35:16 -05:00
stripe_subscriptions Last general linting sweep (#1947) 2019-03-02 07:47:14 -08:00
tags Modify styling for tag-edit.scss (#4137) 2019-10-02 15:07:43 -04:00
twitch_live_streams Embed Twitch Live Streaming (#2591) 2019-04-29 18:11:53 -04:00
users Fix capitalization in settings placeholders (#5707) 2020-01-24 14:08:32 -05:00
videos Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00