Part of the JavaScript selectors clean-up effort.
#1574470: Selectors clean-up
#1415788: Javascript winter clean-up
| Comment | File | Size | Author |
|---|---|---|---|
| #43 | reroll_diff_29-43.txt | 4.42 KB | sahil.goyal |
| #43 | reroll_diff_41-43.txt | 1.68 KB | sahil.goyal |
| #43 | 1751388-43.patch | 1.4 KB | sahil.goyal |
| #41 | reroll_29-41.txt | 4.66 KB | sahil.goyal |
| #41 | 1751388-41.patch | 1.49 KB | sahil.goyal |
Comments
Comment #1
nod_use .on/.off
filter.js
Untangle this crazy chained selector.
filter.admin.js
don't need context to select ID.
remove the sizzle-specific things can be done with regular js or a .prop/.attr
don't triggerhandler, only calls 1 event if more are bound to it it won't work.
Comment #2
jelle_sLet's see...
Comment #3
nod_tag
Comment #4
seutje commentedwould be nice if we could also get rid of that
:headersizzle-specific selector. You can just straight replace it withh1, h2, h3, h4, h5, h6afaik.Comment #5
internetdevels commentedComment #6
nod_Thanks for the patch!
For the variable declaration, it is currently up to the standards so there is no need to replace them (we have several var declaration, one variable per line).
See #1778828: [policy, no patch] Update JS coding standards for latest standards (and if you can help out the issue that'd be great!).
Can you also replace
.once('filter-status', function () {with.once('filter-status').each(function () {I want to simplify the.once()function down the line and remove the second parameter #2180921: [META] Use data attributes rather than classes wherever possible.Comment #7
internetdevels commentedComment #10
manuel garcia commentedComment #11
rteijeiro commentedRe-rolled!
Comment #13
rteijeiro commentedOuch! Wrong patch :(
Comment #16
aadrian commentedpatch file
Comment #17
droplet commentedPlease also check if we used Drupal & drupalSettings in this file
we don't combine var declaration
missing $(context)
Comment #18
manuel garcia commentedAddressing comment #17.2 and #17.3
We are calling Drupal.tableDrag and not using drupalSettings on filter.admin.js.
Comment #19
manuel garcia commentedComment #24
kwoxer commentedNeeds a re-roll. As I'm not sure about the checked attribute I do not feel able to provide that patch on my own.
Comment #25
manuel garcia commentedAlso needs reroll for es6 https://www.drupal.org/node/2815083
Comment #26
mayurjadhav commentedComment #27
GrandmaGlassesRopeMan- reroll from #18.
Comment #29
kanav_7 commentedUpdated for drupal 8.6.x. Please Check.
Comment #30
manuel garcia commentedThanks for the rerolls guys.
I can't think of anything else to be done here. RTBC++
Comment #40
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #41
sahil.goyal commentedRerolled the patch for the D10.1.x, as #29 is no longer compatible with D10. Attaching reroll_diff Along with patch.
Comment #42
nod_There shouldn't be a ":" in there. I do not think the code as-is work.
There shouldn't be a need to change the once id here.
Comment #43
sahil.goyal commentedAddressed #42 re uploading the patch and reroll_diff
Comment #44
nod_Manually tested the filter admin interface as well as the text format change behavior, both work as expected.
Comment #46
nod_second time getting this migratestub failure
Comment #49
quietone commentedThis is the remaining change in the patch that could be applied. This change is also in #3239042: Refactor (if feasible) uses of the jQuery sizzle to use vanillaJS.
Perhaps this should be closed as a duplicate and move credit?
Comment #50
rachel_norfolkremoving Novice tag as it isn't too clear what the next action is
Comment #51
smustgrave commentedAgree with #49