PrestaShop / hummingbird

82 stars 76 forks source link

Should we add "~" in these modules_to_hook? #415

Open rodriciru opened 1 year ago

rodriciru commented 1 year ago

https://github.com/PrestaShop/hummingbird/blob/8a83b963f2ff33f48ec7d1bb60df0ddd816aa289/config/theme.yml#L60 https://github.com/PrestaShop/hummingbird/blob/8a83b963f2ff33f48ec7d1bb60df0ddd816aa289/config/theme.yml#L62 https://github.com/PrestaShop/hummingbird/blob/8a83b963f2ff33f48ec7d1bb60df0ddd816aa289/config/theme.yml#L100

Now, when switching themes, all modules hooked into that hooks, will be unhooked from that position, and will remain only the modules in this listed in this file. Adding "- ~" at the end or beginning, will ensure that other modules will stay (for example gpdr, and email alerts)

SharakPL commented 1 year ago

Would be best if whole process of switching the theme could be monitored. Now it's just long loading with alert at the end. Should be a progress bar and a log like you get from 1-click-upgrade or when you import data with CSV.

Module X disabled Module Y enabled Module Z v.1.2.3 installed from Prestashop Add-ons

Plus a prompt at the end when there are conflicts:

Looks like new theme doesn't require these modules used by previous theme. What do you want to do with theme?

Module A v.1.2.3 : Keep Disable Uninstall Module B v.4.2.1 : Keep Disable Uninstall

rodriciru commented 1 year ago

That's looks superb, but I assume it involves core changes, and this is slow. Why not, for the moment, think about these changes? They are faster and don't break any current setup (at least in these hooks) Happy holidays!

NeOMakinG commented 1 year ago

I would say why not, wdyt @Hlavtox ?