[openspending-dev] Satellite sites - wordpress option (and the primary option!)

Tryggvi Björgvinsson tryggvi.bjorgvinsson at okfn.org
Fri May 3 14:26:33 UTC 2013


So here's a rather late reply to this thread. I find Adam's points
really helpful.

On lau 6.apr 2013 14:04, Adam Stiles wrote:
> As a user, I second Vitor's point:
>
> *I feel that for satellite sites, technical documentation about how to use
> the widgets is more useful. Not embedding the iframe, but actually adding
> the js libraries and calling them, so the user could start customizing it.
> *

I second this as well. This would perhaps require another focus on the
openspendingjs project. I imagine openspendingjs as a standalone
library, similar to jQuery or even the bootstrap javascript library.
Simply add this script tag to your header and you can start calling
functions to create stunning visuals. We could then have standard
behaviour based on classes or configurations via javascript calls.

> There are at least two cases where iframes are very limiting and which
> non-JS experts are slow to start using OpenSpending:
>
> - Our site will have commenting at each level of treemap visualizations (so
> 3+ levels of data are not combined on one long comment thread); this
> requires unique URLs on each click of the visual
>
> - Need to be able to share URLs of a particular level/view of a treemap or
> bubble tree

So javascript calls are possible now but it's not documented properly
like Vitor and Adam point out and in Adam's case it wasn't extensible
enough for them to create the site they wanted without maintaining their
own version of treemap.js (I'll push it to the main repo soon since I
did those modifications). Slovakia does the same thing as Adam's team
but ended up with a fairly complex, special Backbone.js-based
implementation to accomplish this small task of generating unique urls.

We need to design openspendingjs from a "configurable" point of view,
not only from the "standard use" point of view.

That's the direction I want to see openspendingjs go into. The
openspending platform would then only use the openspendingjs widgets
like a satellite site instead of requiring it to be accessible from a
subfolder (it actually does that now but it's really hidden somewhere in
http://openspending.org/public/static/openspendingjs/...)

> Embedding was very easy to figure out from OS documentation, but JS widget
> questions have required me to pester the developers with questions that
> will have to be answered over and over again from future users.
>
> And I do agree that directions to launch wordpress OS instances would
> result in many more new sites than relying on solely Jekyll, though I'd
> address this just after the issue above.

I think after having a clear separation between openspending and
openspendingjs satellite sites will become easy to set up in whatever
cms/static page generator people want. It would just be a matter of
either downloading or pointing to the openspendingjs library and then
adding special divs/spans/whatever or javascript calls.

Creating a WordPress plugin would be a breeze, imo.

This (openspending and openspendingjs relationship) is something that I
want to discuss on our next dev meeting (the one postponed until next
Thursday). I haven't sent out the agenda yet though but I'll do it soon.

/Tryggvi





More information about the openspending-dev mailing list