Tiddlywiki5: [BUG] Reveal widget refresh bug

Created on 11 Dec 2020  路  5Comments  路  Source: Jermolene/TiddlyWiki5

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.

Most helpful comment

@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.

All 5 comments

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 the class or style attributes 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dubiouscript picture dubiouscript  路  6Comments

saqimtiaz picture saqimtiaz  路  4Comments

morosanuae picture morosanuae  路  6Comments

TiddlyTweeter picture TiddlyTweeter  路  6Comments

rmunn picture rmunn  路  4Comments