opengovernment/person-widget

Name: person-widget

Owner: OpenGovernment

Description: An Ember.js app that allows users to ask someone specific, like an elected official, a question on AskThem.io.

Created: 2015-03-12 07:40:34.0

Updated: 2015-07-05 16:11:08.0

Pushed: 2015-04-10 06:37:05.0

Homepage:

Size: 256

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Person Widget

This is the basis for a third party widget for AskThem.io, it will be distributed via jQuery loader and multiple instances of the Ember app will be able to run on a page.

It is an Ember.js app that allows users to ask someone specific, like an elected official, ask a question on AskThem.io

This README outlines the details of collaborating on this Ember application.

Prerequisites

You will need the following things properly installed on your computer.

And also this addon that is currently unreleased:

You need to clone that repository, cd into it, and run “npm link” before proceeding with installation.

Installation
Running / Development

In development and testing the app relies on having a local copy of askthem.io running at askthem.dev, YOU'LL NEED TO CHANGE config/environment.js a bit to get it working without it. Here's how:

ENV.APP.askThemHost = 'askthem.dev' # under development/test change to 'www.askthem.io'

This app takes meta tag declared options, using ember-cli-meta-options, to configure the app. See notes under deployment about configuration.

Running Tests
Building

During a production build, I have added an additional step using ember-cli-make-concoction that creates an “app template” that the jQuery loader will then instantiate with a unique Ember app modulePrefix, etc. This the trick that allows multiple instances of the widget to run on a host page.

This can safely be ignored unless you are specifically using it with the jQuery loader.

Deploying

In the case of AskThem.io, this is a manual process right now. I'll write a post about it at some point.

Otherwise the deployment should be fairly standard. Just remember to set up your configuration via meta tags on the host page. See app/index.html and tests/index.html for example configuration.

Further Reading / Useful Links
Credits

Originally developed by Walter Mcginnis.

This ember-cli add-on was built as a part of widget work for http://askthem.io.

Thanks to the Ember.js, ember-cli, and Broccoli teams for excellent work.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.