This sounds like a great feature to have, especially for the HTML widget. That being said, I think it would be beneficial to have this across the board for all widgets of the layouts plugin. Perhaps, this is something we could integrate as a core feature for the layouts plugin?
Approach it by selecting a widget setting that’s similar to the setting you’re trying to add. Do a search for that setting name in the code and make idenical additions, apart from a change in the name. Reasoning by analogy will get you pretty far in this kind of situation.
Then make a PR with that change and @keegan can tell you if you need to make any tweaks.
So that’s how I understand how re-naming would work:
There’s a theme setting widget name. So I can change the name of the widget right on the component settings. Then I can select the widget by it’s new name on the dropdown at /admin/layouts/widgets. I shared that flow on the screenshots above.
But to have that option show on the component settings, I need to add it to settings.yml of the component, no? If I’d add the option to the plugin, it would show with the other options on /admin/layouts/widgets. But in fact the additional widget won’t show up with it’s new name on the dropdown select, until it already has a new name. So this actually can’t work?