docbrown/app
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
..
assets Don't raise StandardError for invalid liquid tags when updating comment (#5694) 2020-01-24 11:26:55 -05:00
black_box Move from env variables to SiteConfig (#5385) [deploy] 2020-01-07 16:36:24 -05:00
controllers API tags: improve caching and purging (#5673) [deploy] 2020-01-24 13:55:22 -05:00
dashboards Pro: memberships (#3461) 2019-09-24 10:38:54 -07:00
decorators [deploy] Raise not_found for spam-banished users (#5586) 2020-01-20 14:50:22 -05:00
errors Pro: memberships (#3461) 2019-09-24 10:38:54 -07:00
fields Enables Rails cops (#2186) 2019-03-25 09:25:55 -04:00
helpers Add guard clause for presence of processed_html (#5638) [deploy] 2020-01-22 15:32:50 -05:00
javascript Add StimulusJS and Refactor Internal article_script (#5539) deploy] 2020-01-24 16:00:24 -05:00
jobs Remove mentions email notification job (#5708) 2020-01-24 14:06:51 -05:00
labor API tags: improve caching and purging (#5673) [deploy] 2020-01-24 13:55:22 -05:00
lib Adds 4estate.media to Mastodon instance whitelist (#5625) 2020-01-21 08:59:52 -05:00
liquid_tags Fix error handling bugs in stackexchange tag (#5490) 2020-01-20 14:43:25 -05:00
mailers Restore default email from SiteConfig for mailers (#5399) [deploy] 2020-01-08 16:09:32 -05:00
models Change BustHomepageCacheJob to BustHomepageCacheWorker and move to sidekiq (#5581) 2020-01-24 12:59:34 -05:00
observers Move SlackBotPingJob to Sidekiq (#5615) 2020-01-22 08:24:33 -05:00
policies Handle missing commentable for user_is_commentable_author? check (#5336) [deploy] 2020-01-02 18:06:05 -05:00
sanitizers Add support for mark element in markdown (#2089) 2019-03-18 17:10:58 -04:00
serializers/webhook Use a sortable unique ID for the event_id (#3972) 2019-09-09 10:15:12 -04:00
services Migrate PodcastEpisodes::CreateJob to PodcastEpisodes::CreateWorker for Sidekiq (#5633) 2020-01-23 15:37:43 -05:00
uploaders Limit ALL Upload file sizes to 25 MB (#5356) [deploy] 2020-01-07 11:20:40 -05:00
view_objects Remove RedisRailsCache and replace with Rails.cache (#5059) [deploy] 2019-12-10 13:11:08 -06:00
views Add StimulusJS and Refactor Internal article_script (#5539) deploy] 2020-01-24 16:00:24 -05:00
workers Move ExportContentJob to Sidekiq (#5688) [deploy] 2020-01-24 10:12:58 -08:00