Creating a Team Dashboard with Smashing
Tags: ruby, webdev, learning
Published: 2020-05-16 00:36:10

---
title: Creating a Team Dashboard with Smashing
description: A reflection of how I created a Team Dashboard using the Ruby framework, Sinatra.
published: true
date: 2020-05-16 00:30:15 UTC
tags: ruby,web-development,learning
canonical_url: https://medium.com/hanley-wood-development/creating-a-team-dashboard-with-smashing-b2e435248fcf
---

![](https://cdn-images-1.medium.com/max/1024/1*cpQYyIvS7KiIPYMVM_J_8w.png)<figcaption>Date Trends Illustration from <a href="https://dev.to/scottw/-undraw-10ge-temp-slug-8229813">unDraw</a></figcaption>

Every now and then, I chose to work on a side project that could benefit our Development team or Hanley Wood in some way. I decided to create a team dashboard for Hanley Wood employees to see what the Business Media Development team is up to and learn about who we are. We used to have a dashboard that displayed on our TV monitors years ago, so the idea initially stemmed from that concept.

I started on this back in 2017, took a break from it, and then finally completed it just a few months ago. Many of the widgets created for the [Smashing](https://github.com/Smashing/smashing) framework were outdated, so I had to read up on quite a few APIs to update the code. For the UI design, I decided to use [Tachyons](http://tachyons.io/) and [Font Awesome](https://fontawesome.com/).

![](https://cdn-images-1.medium.com/max/1024/1*KAsazf11RSGMfwxtNpq6FA.png)<figcaption>Completed Dashboard Screenshot</figcaption>

### What’s Smashing?

[Smashing](https://smashing.github.io/) is an open-source dashboard framework that uses Ruby and Coffeescript.

![](https://cdn-images-1.medium.com/max/1024/1*IoYIR12r3kTN7-zFsbA67Q.png)

It’s easy to add widgets, and there are many that a premade at [https://github.com/Smashing/smashing/wiki/Additional-Widgets](https://github.com/Smashing/smashing/wiki/Additional-Widgets)

Here’s a super simple one to display Twitter mentions, courtesy of [Vanessa Henderson](https://gist.github.com/VanessaHenderson) on Github:

**twitter.rb**

```
require 'twitter'

#### Get your twitter keys & secrets:
#### [https://dev.twitter.com/docs/auth/tokens-devtwittercom](https://dev.twitter.com/docs/auth/tokens-devtwittercom)
twitter = Twitter::REST::Client.new do |config|
  config.consumer\_key = 'YOUR\_CONSUMER\_KEY'
  config.consumer\_secret = 'YOUR\_CONSUMER\_SECRET\_KEY'
  config.access\_token = 'YOUR\_ACCESS\_TOKEN'
  config.access\_token\_secret = 'YOUR\_ACCESS\_TOKEN\_SECRET'
end

SCHEDULER.every '15m', :first\_in => 0 do |job|
  begin
    user = twitter.user
    if mentions
      mentions = mentions.map do |tweet|
        { name: tweet.user.name, body: tweet.text, avatar: tweet.user.profile\_image\_url\_https }
      end

send\_event('twitter\_mentions', {comments: mentions})
    end    
  rescue Twitter::Error
    puts "\e[33mThere was an error with Twitter\e[0m"
  end

end
```

Then insert the following HTML into the dashboard.erb file:

```
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
      <div data-id="twitter\_mentions" data-view="Comments" style="background-color:#00afd7;" data-moreinfo="Tweets @sourceclear" ></div>
      <i class="icon-twitter icon-background"></i>
  </li>
```

More info on this widget can be found at this gist: [https://gist.github.com/VanessaHenderson/9aa0823efdfc085f675d](https://gist.github.com/VanessaHenderson/9aa0823efdfc085f675d)

### What’s Included?

The goal for this dashboard was for it to be something that could display on the TV monitor near the dev team as well as be accessible to internal employees.

For this reason, I decided to include the following info to display:

- **Links to helpful resources**  — included our internal documentation site, our team availability calendar, and a link to email requests for interactives.
- **List of team members ** — this used the Slack widget and used an icon to display whether or not a team member is online.
- **Sprint details**  — this included the sprint dates, goal(s), and the status of bugs.
- **Deployment details**  — included the date of the next deployment and any additional information, such as if there is a delay.
- **Code commits ** — used separate modules to display code changes to our CMS system and code changes to our Continuing Education system.

### What was Challenging?

Most of this project involved dealing with code I’d never dealt with before, so that was a challenge in itself. I had to learn Ruby, Coffeescript, and the APIs for Slack, Github, and Google. The problems that hindered me the most was trying to use a widget that initially didn’t work, only to realize I needed to update to a new API, and trying, and failing, to use the Vivify API to use sprint data.

#### Outdated Widgets

The list of user-submitted widgets provided by Smashing was super helpful, however many are were outdated.

For instance, the Slack API had changed since the creation of the [Slack User Presence widget](https://gist.github.com/machadolab/c948672c4a6855c48a596dd4fbbb9646), so I had to familiarize myself with the API instead of being able to use the widget right out the box.

This line:

```
slack\_client = Slack::Client.new token: options[:api\_token]
```

ended up having to change to:

```
slack\_client = Slack::Web::Client.new token: options[:api\_token]
```

#### Vivify Scrum

I had a hard time working with Vivify Scrum’s API to display the info I wanted. I asked via Twitter if it was possible to obtain the current sprint using their API, and they said, “no.” To finally finish the project, I scrapped trying to use the API and opted to populate the sprint data using a Google Form, thus, I learned how to use the Google Drive and Spreadsheets APIs to populate the sprint data into the dashboard. I can always come back to utilizing the Vivify Scrum API later.

---

### Conclusion

I had a lot of fun working on this. It was a side project meant for me to work on something outside of what I typically do at Hanley Wood. Not everything worked out as I expected, but I’m glad to have the experience under my belt.

![](https://cdn-images-1.medium.com/max/1024/1*JvyJ6L-4gstKmSis9cUa4A.png)<figcaption>Celebration Illustration from <a href="https://dev.to/scottw/-undraw-10ge-temp-slug-8229813">unDraw</a></figcaption>

* * *