Custom Dashboard - Part 1

Episode #432 by Teacher's Avatar David Kimura

Summary

In this episode, we'll look at creating the initial management for a customizable dashboard. Users can add and arrange widgets to their dashboard.
rails hotwire stimulusjs 43:14

Chapters

  • Introduction (0:00)
  • Creating the models (2:03)
  • Setting up a default dashboard (4:29)
  • Updating the Dashboard controller (6:33)
  • Setting up the nested attributes logic (7:40)
  • Setting up the Widget model (9:06)
  • Importing GridStack (12:04)
  • Fixing asset building (13:24)
  • Building the form view (14:50)
  • Creating the widget fields partial (20:46)
  • Creating the widget new partial (22:01)
  • Implementing GridStack in the stimulus controller (25:10)
  • Persisting widgets on dashboard (26:22)
  • Reloading saved widgets (30:35)
  • Creating the widget json (31:36)
  • Updating a saved widget (39:17)
  • Removing a saved widget (40:16)
  • Final Thoughts (42:22)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams