gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.04k stars 204 forks source link

Issue with changing the Presets from the front-end #1068

Open JoomFX opened 8 years ago

JoomFX commented 8 years ago

@w00fz @mahagr Hey guys,

There is an "issue" with changing the Presets from the front-end. It is a bit difficult to explain it with text so I recorded a video explaining everything.

I do understand that changing the presets from the front-end is a tricky thing, and most probably this "issue" cannot be "fixed", but still, as it is quite annoying I'd like to discuss it with you and see if this can be improved somehow.

So, here's the video:

https://youtu.be/EsTJGtqLB0M

Currently my workaround is to add some additional CSS only for the template demo, I mean I'm hardcoding the styles of some elements. But once the customer installs the template (quickstart) and if he changes the preset from the front-end on his installation, he will see this issue because he will not have the CSS that I'm using only for the demo.

I checked the RT templates, and I see that you are doing a similar thing - you are hardcoding some styles in demo.css.

Anyway, it will be great if this can somehow be improved. And once again, I do understand that this front-end preset changing is quite tricky but let's see what your brains can come up with :smile:

mahagr commented 8 years ago

I watched your video and it looks like all of it works like designed, though I can see why it doesn't work as you expect. I also can see why it can be issue as using preset from the frontend is equal on clicking on preset in admin and hitting save -- it was originally designed to ignore any settings you may have chosen and is meant to be used only in our demos..

It is fully possible to make it to work in another way, though I'm not sure what the best way would be.

w00fz commented 8 years ago

Yeah the ability to change presets from query string on front-end, is really something we invented back with the first Gantry. We needed a mechanism to showcase the different styles as well as allow the customers to switch between them. It was never really meant to be used for switching style on production, the developer and author should manage that via admin.

That's why now in Gantry 5 we have it as a standalone plugin, and that's also why in our RocketLaunchers we always have the presets plugin disabled by default.

I don't think this is something we should be looking into changing nor spend too much time on, it is behaving as we want it to, which is the possibility to cycle through the presets that a theme comes with.

JoomFX commented 8 years ago

Alright, thanks guys.

@w00fz

We needed a mechanism to showcase the different styles as well as allow the customers to switch between them. It was never really meant to be used for switching style on production

Yeah, I completely understand that. And the issue I reported here is about the demos of my templates :smile:

and that's also why in our RocketLaunchers we always have the presets plugin disabled by default

No, you recently started disabling the plugin in the Rocketlaunchers :smile: I just tested some old installations on localhost (Ethereal and Requiem, both v1.0.0) and the plugin is enabled by default. And now I just re-downloaded the the Rocketlaunchers of these two templates (the latest versions) and now I see that the plugin is disabled. What I mean is, you have updated the Rocketlaunchers and have disabled the plugin ;)

Well, yeah... disabling the plugin in the Quickstart/Rocketlauncher solves my problem, I just had forgotten about that option. And regarding the demos of my templates - I will just hardcode the styling there (as you are doing as well). Basically, if you have a "Home" outline, that overrides the default template styles (for example the default "Header" background is #ffffff, but on the Homepage you want it as #000000), it is not possible to use the front-end presets (without breaking the demo) without hardcoding some styles (only for the demo).

So feel free to close this issue. I'm happy with just disabling the plugin. BUT, if you want a good example of what I mean I can record a video of my last template that clearly illustrates what I mean ;)

And as usual, thanks guys :smile:

w00fz commented 8 years ago

FYI the plugin was always meant to be disabled, those early RL you see the plugin enabled was just a mistake on our end. We use automated tools to cleanup the SQL and prep it for deployment, the presets plugin being disabled was involuntary skipped, leaving it enabled. We fixed it as soon as we noticed.

Bottom line is, plugin is always supposed to be disabled. The only reason we leave it in the package is so that you can enable and use it if you want to replicate RocketTheme's demo representation, but we need it to behave like it is doing now so that users visiting will always get a clean rendering of the Preset they chose to review.

Hope it makes sense.

JoomFX commented 8 years ago

@w00fz Djamil, mate... I completely understand everything you are saying and it makes perfect sense - and I'm not arguing with you.

Also, my problem/worries are now gone by disabling the Preset plugin in the Quickstart/RocketLauncher.

Now, I just want to let you know what were the reasons to open this issue:

  1. Changing the Presets from the front-end is not the same as changing the Preset from the backend.
  2. If the plugin is not disabled in the Quickstart/RocketLauncher (thank you for reminding me for that option) the user might (just for test purpose) change the Preset from the front-end, which (if the Home Outline is overriding default template settings) will result in a broken/non-intended homepage style.

Once again, now everything is good. I just had to realize couple of things and disable the Preset plugin in the Quickstart package.

I hope you understand what my worries were ;)

w00fz commented 8 years ago

Sorry if I sounded like I was arguing: I wasn't. I was trying to explain why there were some RocketLaunchers with the preset plugin enabled which, you are right, did happen.

I also understand what you are saying and I think this issue should stay open, Matias already tagged it for Future Releases which makes it logged and means we can take a look at improving it in the future. My point was just that this is a low priority issue.

Thanks for bringing it up to our attention!

shoulders commented 8 years ago

I cant find any documentation on this presets plugin on the official site, if i have missed it can someone point me to the right place. If there is none, can some notes about this be added to the wiki at gantry.org

tar

mahagr commented 8 years ago

Its a plugin in Joomla and built into Gantry in WP and Grav. Its just meant to show off the theme presets and is used for demo purposes only as its really not suitable for changing looks of a real site.