docbrown/app/javascript
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
..
.storybook Optimise images (#2966) 2019-05-30 17:37:10 -04:00
analytics Move Chart.js to dynamic import (#5576) [deploy] 2020-01-18 20:46:35 -05:00
article-form Use the correct cover image in article form preview (#5660) [deploy] 2020-01-23 17:06:06 -05:00
chat Add conditional to prevent superfluous rerenders in chat compose (#5705) [deploy] 2020-01-24 11:23:48 -05:00
contentDisplayPolicy Migrate to streaming app shell via serviceworkers (#5020) [deploy] 2019-12-16 12:21:33 -05:00
githubRepos Fix eslint errors in listings/elements/title.jsx (#4496) [ci skip] 2019-10-23 14:21:47 -04:00
history History and reading list refactoring (#3338) 2019-07-02 09:22:21 -04:00
internal Add StimulusJS and Refactor Internal article_script (#5539) deploy] 2020-01-24 16:00:24 -05:00
listings Chat: Remove Report Button from user's own profile sidebar (#4604) [deploy] 2019-12-02 16:35:47 -05:00
onboarding Allow for proper deselect of email_newsletter (#5675) 2020-01-23 16:59:17 -05:00
organization Refactored to use a common <OrganizationPicker /> component (#4470) 2019-10-24 17:27:16 -04:00
packs Add StimulusJS and Refactor Internal article_script (#5539) deploy] 2020-01-24 16:00:24 -05:00
profileDropdown Chat: Remove Report Button from user's own profile sidebar (#4604) [deploy] 2019-12-02 16:35:47 -05:00
readingList add heading and clear all btn to tag filters (#4620) 2019-10-28 09:39:47 -04:00
searchableItemList fix totalCount getting an array instead of a number (#5359) 2020-01-09 09:47:55 -05:00
shared/components Fix event propagation for click on tag rules in editor (#5280) [deploy] 2020-01-02 13:04:16 -05:00
sidebar-widget Fix lints for sidebarwidget and sidebaruser (#4418) [ci skip] 2019-10-14 14:43:26 -04:00
src Feature🚀: Ability to mention anyone in open chats and notify them (#5460) [deploy] 2020-01-23 18:06:35 -05:00
.eslintrc.js refact: refactor userDetails (#5467) 2020-01-16 14:02:49 -05:00