Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Remote: https://github.com/paulirish/matchMedia.js
matchMedia is written with debounce feature now.
- reduce dependencies & added "matchmedia.addListener" ( sometimes, it only need matchMedia )
Comment | File | Size | Author |
---|---|---|---|
#42 | interdiff-39-42.txt | 523 bytes | tarekdj |
#42 | update_matchmedia-2207629-42.patch | 7.96 KB | tarekdj |
#39 | update_matchmedia-2207629-39.patch | 7.89 KB | tarekdj |
#37 | interdiff-33-37.txt | 7.5 KB | tarekdj |
#37 | update_matchmedia-2207629-37.patch | 7.94 KB | tarekdj |
Comments
Comment #2
droplet CreditAttribution: droplet commentedOuch, forget generate the new patch after testing. Here is new patch with correct path.
Comment #3
droplet CreditAttribution: droplet commentedComment #5
droplet CreditAttribution: droplet commentedComment #6
sunThis proposal seems to conflict with the latest proposals in #1848500: Use performance optimized matchmedia polyfill
Comment #7
droplet CreditAttribution: droplet commentedBoth script are very similar. I could see the author name: "WebLinc, David Knight." there. This patch version is rewritten by him in upstream.
Comment #8
sunCan you clarify (in code) which version we're updating to?
In case this is the upcoming/not-yet-released 0.1.1, then it should state:
Comment #9
droplet CreditAttribution: droplet commentedComment #10
droplet CreditAttribution: droplet commentedAdd back the commit hash
Comment #11
sunThe issue summary claims
...but I'm not able to see a proof for that in the actual patch?
If there is no use-case for the split in core, then let's merge the two library declarations into a single.
Comment #13
droplet CreditAttribution: droplet commented@sun,
Checkout CORE Seven theme.
nav-tabs.js
it used resize event:
$(window).on('resize.tabs', Drupal.debounce(handleResize)).trigger('resize.tabs');
(resize based on tab sizes / content width, not the viewport size)
Comment #14
sun@nod_: Can you confirm @droplet's statements? I'm not familiar with those custom event listeners.
A new 0.2.0 release was created a few days ago:
https://github.com/paulirish/matchMedia.js/releases
This means that we should pull in exactly the tagged code + remove the @todo about creating a new upstream release from the library declaration (replacing version with the actual version, and removing 'commit').
The only change since 0.2.0 appears to be an oversight in bower.json, which is irrelevant for us (at this point):
https://github.com/paulirish/matchMedia.js/compare/0.2.0...master
@droplet: Can you perform these changes?
Comment #15
sunComment #16
droplet CreditAttribution: droplet commentedComment #18
droplet CreditAttribution: droplet commented16: 2207629-11-matchmediaJS.patch queued for re-testing.
Comment #20
droplet CreditAttribution: droplet commented16: 2207629-11-matchmediaJS.patch queued for re-testing.
Comment #21
Wim Leers16: 2207629-11-matchmediaJS.patch queued for re-testing.
Comment #22
nod_16: 2207629-11-matchmediaJS.patch queued for re-testing.
Comment #23
nod_Looks ok to me, I'll wait for the testbot before gooing further.
Comment #24
nod_All good :)
Comment #25
catchCould we not put a minified version in instead?
Comment #26
xjm@catch, wouldn't that be in scope for #1341792: [meta] Ship minified versions of external JavaScript libraries?
Comment #27
jhedstromPatch in #16 needs a reroll.
Comment #28
catch@xjm I think we might as well use the minified versions when doing updates at this point.
Comment #29
rpayanmrerolling...
Comment #33
Devin Carlson CreditAttribution: Devin Carlson commentedThis should fix the test failures.
I'm not sure what to do about minified versions of the files, since they aren't included with the repository.
Comment #34
Wim LeersPatch looks good. I'd say that to ship with a minified version, we want to apply uglifyjs2 to the source. NW only for that, if catch hadn't asked to minify this, this would be RTBC.
Comment #35
droplet CreditAttribution: droplet commentedHere're the online version of 2 best minifier:
http://lisperator.net/uglifyjs/#demo
http://closure-compiler.appspot.com/home
incorrect ?
Comment #36
Wim Leers#35: No, that's correct. See
core.libraries.yml
, the entries for jQuery UI, for similar examples.Comment #37
tarekdj CreditAttribution: tarekdj commentedMinified using uglifyjs2 :
Comment #38
Wim LeersThank you! Two nitpicks, after which this will be RTBC:
All minified JS in core uses
.min.js
, not-min.js
. Let's be consistent with that.Please add newlines at the end of these files.
Comment #39
tarekdj CreditAttribution: tarekdj commentedupdated patch.
Comment #40
Wim LeersThank you!
Comment #41
catchShould the license link to either https://github.com/paulirish/matchMedia.js/blob/0.2.0/LICENSE.txt (current patch keeps it at 0.1.0)?
Comment #42
tarekdj CreditAttribution: tarekdj commented@catch you're right!
Fixed the license.
Comment #43
Wim LeersUgh, missed that. Good catch, catch.
Comment #46
catchRetrospectively marking critical as a child of #2203431: [meta] Various asset (JavaScript) libraries have to be updated to a (minified) stable release prior to 8.0.0.
Committed/pushed to 8.0.x, thanks!