Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
javascript
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2019 at 10:04 UTC
Updated:
4 Oct 2019 at 23:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huzookaComment #3
lauriiiWould be great to get feedback from the subsystem maintainers on where they think this new theme function should be located.
Comment #4
huzookaComment #5
nod_Adding this theme function to all pages using core/drupal seems a bit overkill.
I would create a new library and have tableselect and media library depend on it.
Comment #7
quironRe-rolled to 8.8.x
Comment #8
quironSorry, the previous re-rolled patch was wrong. Adding the correct one.
Comment #9
quironMoved the new JS code to an own library for the checkbox. So renamed JS files to 'checkbox' instead of the generic 'drupal-theme' and make tableselect and media_library view depending on it.
Comment #10
quironComment #11
lauriii@nod_ confirmed on Slack that we can remove the subsystem maintainer review tag based on #5.
Comment #12
lauriiiThis change needs a change record. Drupal.org documentation on how to write a change record.
Comment #13
quironCreated a change record draft: https://www.drupal.org/node/3061281
Comment #14
lauriiiIt seems like we have a few more instances where checkbox is being rendered in JavaScript the old way that should be converted. The files I could find are
user.permissions.es6.jsandsimpletest.js.Comment #15
quironI will work on it today.
Comment #16
quironImplementing @lauriii's feedback
Comment #17
rosinegrean commentedComment #18
lauriiiCould use a review from a JavaScript maintainer.
Comment #19
wim leersform-checkboxclass to ensure the exact same markup is still generated, which is certainly fine (even if said class does not exist in the theme's override of the markup). That's why I'm confident to remove the tag. The only addition is that it's removingComment #20
wim leersComment #21
lauriiiDiscussed this issue with @alexpott since I was concerned about the lack of label support. This is needed by
Drupal.behaviors.MediaLibrarySelectAll.Since this issue already helps us make meaningful progress, and label support could be added without breaking BC in a follow-up, we agreed on the following steps:
Comment #22
lauriiiOpened #3082598: Add theme function for form labels in JavaScript.
Comment #23
alexpottCommitted 21e024e and pushed to 8.8.x. Thanks!