Skip to content
Matt-Yorkley edited this page Dec 10, 2020 · 11 revisions

Branches and TLDR Screencasts

The various feature branches have fairly clear commits, so the top 2-4 commits in each one shows the story of each branch pretty clearly. Screencasts and additional notes below.

master

This branch contains the example app (before Stimulus Reflex). Intro and overview video here.

install-stimulus-reflex

This branch adds Stimulus Reflex to the app. It's 2 commits.

reactive-forms

This branch adds various bits of reactive UX to the app:

  • Adding live search and filter UX to the course page. Video here.
  • Adding live search and filter UX to the admin pages. Video here.
  • Clearing search forms with a reusable Reflex. Video here.
  • Handling admin bulk update action with a new Course Reflex. Video here.
  • Attaching some custom UX behavior to an element via lifecycle methods. Video here.

live-validation

This branch adds some live form validation examples. Video here.

inline-editing

This branch shows a quick example of handling inline updates of a record from an index page. Video here.

modals

This branch shows an example of dynamically rendering partials in a modal via a Reflex. Video here.

notifications

A new notifications feature is added to the app in the branch, and an example of multi-user broadcasted push updates with CableReady is added. Video here.

messages

In this branch a new feature is added that allows admin users to send direct messages to regular users and allows them to reply. The feature is enhanced with added live-chat functionality using CableReady. No video yet...

api

This branch contains a quick refactoring experiment. A namespaced API is added which exposes endpoints for courses, and the duplicated business logic in the Admin::CourseController, Api::CourseController and CourseReflex actions is extracted into a Concern, where it can be defined once and re-used in all three contexts. The post-action rendering is different in each case, so this is left in the respective context.

Setup and usage

Ruby version

This example was made with Ruby 2.5.7. If using rbnev, you can do: rbenv install 2.5.7 && rbenv local 2.5.7

Gems and packages

bundle install && yarn install. You may need to run this again when switching branches.

Postgres

Requires postgresql and a user with create permissions. Username and password can be set in the dotenv file (.env).

Database and seed data

rails db:create && rails db:setup. There's some useful seed data in db/seeds.db.