That thing feels hacky, and it uses the Drupal theme API in a way it shouldn't be used anymore (and will probably be removed in Drupal 9, as I understand it).
If we're going to make our own render element derived from Tableselect, it should be a subclass.
Comments
Comment #2
cburschkaLooking at the D8 Form API again, I feel comfortable postponing this to D9.
That thing isn't even actually object-oriented - the plugin classes are just containers for static methods, and the static _info hook references the static render/process functions by name.
In that context, the way xbbcode intercepts the tableselect element isn't so bad. Once Drupal 9 comes around, this will probably change.
Comment #3
cburschkaComment #4
kristen polPer a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.
Comment #5
cburschka