The <$reveal> widget does not update if the either the class or style attributes change.
@Jermolene let me know if you are open to a patch for 5.1.23 in which case I can work on one today, or if you want to leave this for 5.1.24.
It was a very easy fix so I've pushed a PR regardless of when we want to merge it. #5258
Thanks @saqimtiaz
The
<$reveal>widget does not update if the either theclassorstyleattributes change.
I fear there may be a few more of these, it may be worth doing a structured review at some point.
@Jermolene agreed. For 5.1.24 I'd also like to consider adding a method to the widget base class to handle assigning/updating classes to the widget DOM node as this pattern is showing up often now.
@Jermolene agreed. For 5.1.24 I'd also like to consider adding a method to the widget base class to handle assigning/updating classes to the widget DOM node as this pattern is showing up often now.
If we're dreaming a little, I've always wanted to make the widget interface more declarative. For example, a widget could declare a structure describing the attributes that it requires, and the system could then deal with a lot of housekeeping around rendering and refreshing. With a bit more metadata we could start to think about popup help in the editor as one starts to type a widget naem.
a widget could declare a structure describing the attributes that it requires, and the system could then deal with a lot of housekeeping around rendering and refreshing
@Jermolene I've had the same thought when optimizing the refresh code of some of the widgets. Further this would help with situations like the one with providing variables to action strings that are derived from widget attributes as well. Something to consider and look into when time allows.
Most helpful comment
If we're dreaming a little, I've always wanted to make the widget interface more declarative. For example, a widget could declare a structure describing the attributes that it requires, and the system could then deal with a lot of housekeeping around rendering and refreshing. With a bit more metadata we could start to think about popup help in the editor as one starts to type a widget naem.