We had an issue where core OpenEdX JS would throw an error in LMS upon rendering a unit that includes the XBlock. The issue was that it was attempting to initialise a function that didn't exist. Because of this the overall JS would stop working properly, therefore making unit navigation malfunction.
Another issue was that if you navigate to another unit, then go back to the unit with this XBlock, the styling of the XBlock would disappear. The problem was that the rendered content wasn't tokenised. This is resolved by introducing a new function that triggers the Prism API to retokenise, then initialising that function on XBlock render.
New Feature
Previously the XBlock could only do one theme per unit, regardless of how many you choose and how they work. This is now fixed by prefixing theme CSS rules, whilst adding a theme-related class to the wrapper.
Change description
Fixes
We had an issue where core OpenEdX JS would throw an error in LMS upon rendering a unit that includes the XBlock. The issue was that it was attempting to initialise a function that didn't exist. Because of this the overall JS would stop working properly, therefore making unit navigation malfunction.
Another issue was that if you navigate to another unit, then go back to the unit with this XBlock, the styling of the XBlock would disappear. The problem was that the rendered content wasn't tokenised. This is resolved by introducing a new function that triggers the Prism API to retokenise, then initialising that function on XBlock render.
New Feature
Previously the XBlock could only do one theme per unit, regardless of how many you choose and how they work. This is now fixed by prefixing theme CSS rules, whilst adding a theme-related class to the wrapper.