Site Customizations: Only One Enabled at Once?

(TALlama) #1

As the code currently stands, SiteCustomizations#custom_stylesheet(key) and SiteCustomizations#custom_header(key) look like they can support having multiple customizations enabled at once, but only one stylesheet is ever loaded and only one header is ever loaded. These two call sites should probably find all enabled customizations, and any previewed customizations, and load up the stylesheets/headers for each.

To make matters worse, previewing a customization replaces the customization all other users are using, since it’s set in your session and the current code doesn’t “trickle down” to also load the other enabled customization (preview_style ||= enabled_style_key, so it can never be both. Then, it doesn’t seem to get cleared when it should; the preview goes away, but the globally-enabled customization never returns.

Share your custom CSS?
(Ethan Kaplan) #2

I’m also seeing an inconsistent behavior as to when a style is applied. Sometimes it shows, sometimes it doesn’t.

(Jeff Atwood) #3

@sam did we ever get the different per-save filename support in here to break caches?

(Sam Saffron) #4

Not done yet, but will happen, I held back cause purge semantics get complicated. we do break caches with the url string, but some caches are bad and so on.

I will amend this to create a new filename per save and purge old ones.

(Michael Lapidakis) #5

Is there an update on this? I’m seeing problems enabling and previewing multiple customizations.

(Sam Saffron) #6

Created a mini spec for this.