btw, just as a side note here, whilst the widget API is all very bespoke and somewhat fiddly (especially the hyperscript stuff), I must admit it is extremely powerful to attach new behaviour to existing widgets without having to override lots of code.
for example I’ve used this pattern a lot:
api.reopenWidget('discourse-awesome-widget', {
html(attrs, state) {
let contents = this._super(...arguments);
contents.unshift(h("div.my-cool-new-thing", "cool new thing"))
return contents;
}
});
this._super could be a lot of code!!!
And it can get a lot cleverer than that such that I’ve come to really appreciate it.
I hope the “override-abiliy” of whatever replaces it will be as equally flexible and powerful.