Closed lushkant closed 3 years ago
After looking at countless ways of persisting Style Kit control change at Page Settings for a newly created kit, I have found this solution doable, please check and let me know. Please go ahead if you think there is a better way to achieve this 😃
Merged in #482
Addresses #479
Solution
We are now re-rendering page config on kit save as, this fixes two things, first is to update the page Style Kit control to have the newly created kit and second is to avoid an error while we call the
setExternalChange
option to set/apply this newly created kit as the current page kit.Remaining problem
While setting the newly created kit to Page Settings > Style Kit control via ang-action.js goes away when the page triggers Kit editor to load new kit styles.
How to replicate this
A look at the code
ang_action_tokens
control to the newly updated kit id which then triggers this refreshKit hook for loading/enqueuing the new kit styles.I'm open to any solution you suggest @mauryaratan