Loomio
Sat 22 Dec 2018 8:41PM

Customizing poll colors and/or icons with plugins

J J Public Seen by 173

I'm curious if there's a relatively straightforward way to modify the colors and/or icons associated with the proposal options (i.e. green for agree, light-orange for abstain, light-warm-red for disagree, and red for block).

Is it possible to use plugins to do this somehow? I see that colors are stored in /config/colors.yml. Not sure if a plugin can somehow modify/overwrite some or all of that. And I'm not sure if it's possible, or safe, to modify the file in the docker container directly somehow (I don't know how to do that anyway).

I've been trying to figure this out on my own, but I'm at a loss.


For context, I have an instance of Loomio running for the organization I'm a part of, and we wanted to use our own verbiage for the poll options. @robertguthrie was a huge help and explained how to use custom translations via plugins to do that. Now I'm trying to get the colors and/or icons to match up a bit better with the terms we're using.

RG

Robert Guthrie Sun 23 Dec 2018 12:37PM

Maybe we make a directory that copies files into the config at startup? You can just overwrite any file you like by adding it to this dir.

It seems like we should consider making proposal templates editable? Then you could create some templates and offer them when people go to start a proposal, they could include guidance via an associated help page.

H

Hugi Ásgeirsson Sun 23 Dec 2018 3:41PM

Editable proposal templates would be amazing. Combined with new proposal methods, that would really be a game-changer to fit all kinds of orgs.

J

J Sun 23 Dec 2018 8:41PM

Totally agree with @hugi , editable proposal templates would be awesome! That's something above and beyond what I'm asking, but really is getting to the crux of the issue.

And a directory for custom config files would be fantastic also!

RG

Robert Guthrie Mon 24 Dec 2018 9:55AM

Templates are almost certainly coming in the new year.

Actually for the poll colours, you may just be able to overwrite them from plugin.rb without any new bootstrapping code.

Try writing AppConfig.colors['proposal'] = ['#000', '#500', '#050', '#005'] or something similar into your plugin.rb file.