[style] Best practices for styles, skins, and layouts
Last update looks great, but there's an issue changing styles. I tried to use the new interface to change styles on a fresh install, and it immediately broke everything. I'm getting the error:
Error rendering: +*self+*style (head_stylesheet view) Error rendering: +*self+*style (decko_script_variables view)
Changing the skin back manually doesn't help, and when I tried to revert to the original version I get this error:
414 Request-URI Too Large
You can see the result here: http://ledgefoundation.org/
On a separate but related note, I'd like to know what the best practices are for changing styles. Was I wrong to try to change the style first thing? Are they not really ready yet? Particularly, I'd like to make cards with a very specific layout whenever they're displayed in open view (and ideally some changes to the header when they're closed). In the past, I used SCSS as style cards, but this is brittle, especially as layouts and labels keep changing. Would it be better to implement this as a mod? If so, how would I go about writing a mod to set strict layouts for cards of a certain type? I know that I can set a rule for all cards of that type, but as I said this can be fairly brittle so I'd like to know if there's a better way.
I apologize for the slow response to a serious issue.
First: can you confirm that in addition to updating the decko version (eg with bundle update) that you also ran decko update? This handles data migrations, symlinks, etc.
If so, the first thing I would try is to go to /:admin and click to "clear machine cache". In principle this should not be necessary if you've run decko update, but it's possible this is the problem. (Fwiw, the "machine" in this case refer to the software machines that concatenate and optimize CSS and JS.) If you're unable to reach this through the interface, you can try rake card:reset_all_machines from the console in the deck's root directory.
If that doesn't work, can you see if there is any additional information in the log file (in the log directory in the deck's root)?
I realized I failed to answer the latter part of your question.
Yes, there's been a good bit of upheaval in the layout handling lately. Sorry about that. We're working to simplify things over all, so that after 1.0, things should be far more stable.
In the meantime, you can create your own Layout card and set a *layout rule for the relevant type to use it. See https://decko.org/Layout (which I just updated). If you use SCSS with classes that you maintain in your own layout, things should be far less brittle.