Widgets, the Widget API and their roadmap?

AI-generated summary

The discussion revolves around the future of Widgets and the Widget API in Discourse, particularly in the context of the Ember 5 roadmap. David confirms that the Widget API is being phased out, with efforts underway to replace it with Components. Work is already in progress to convert core elements like the header and topic page, with feature flags and deprecation notices planned for a smooth transition. While new projects should avoid using Widgets, a full deprecation is pending due to the need for a clear migration path for themes and plugins. The team, including @cvx, @isaac, and @kelv, is focused on modernizing the JavaScript stack over the next six months, with major changes communicated via announcements. merefield appreciates the clarity and supports the team’s efforts merefield.

David et al, now that we’re getting to the “end” of the Ember 5 roadmap :sweat_smile:, I have to ask:

What’s the roadmap for Widgets?

Are we expecting these to be replaced fully by Components at some point?

Do we have any kind of ETA on that?

Will the Widget API be placed on EOL or is it officially considered to be EOL already?

Yup, the widget API’s days are numbered. We are already working to reduce their usage in core.

Right now we are actively working on converting the header. We already took care of the search and user-menu dropdowns, and are now moving on to the rest of the header. Current plan is for this change to be behind a feature flag, so that we can introduce deprecations and start the migration process for the (many!) themes and plugins which are currently using decorateWidget(). @isaac has an early draft PR here.

We have also made a start on converting the topic page. At the moment we are starting with some hyper-focussed conversions of areas which are not commonly customized. For example, conversion of the ‘topic map’ is currently in progress - @kelv has a first step in this PR.

For new user interfaces, I would not recommend using widgets. However, we can’t really deprecate the entire system until we have a clear path forward for all kinds of customizations. So I’m afraid the answer right now is ‘it depends’.

It’s a similar story with the ‘raw hbs’ implementation of the topic list. It will be updated, but we don’t have a concrete plan/timeline yet.

Now that the Ember 5 upgrade is almost behind us, removing widgets and raw-hbs is the main focus for our ‘modernising JS’ team (currently @cvx @isaac @kelv and me), so we hope to make a lot of progress over the next 6 months. Any big/risky changes will of course be accompanied by an #announcements topic and guidelines for updating themes/plugins.

I think the message is clear enough, thanks David!

Wish you and the team the best with the conversion effort.