Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
javascript
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2014 at 13:46 UTC
Updated:
2 Jan 2015 at 10:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
droplet commentedOuch, forget generate the new patch after testing. Here is new patch with correct path.
Comment #3
droplet commentedComment #5
droplet commentedComment #6
sunThis proposal seems to conflict with the latest proposals in #1848500: Use performance optimized matchmedia polyfill
Comment #7
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 commentedComment #10
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 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 commentedComment #18
droplet commented16: 2207629-11-matchmediaJS.patch queued for re-testing.
Comment #20
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 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 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 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 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 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!