Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
image system
Priority:
Normal
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
5 Sep 2012 at 18:45 UTC
Updated:
29 Jul 2014 at 21:06 UTC
Jump to comment: Most recent file
Comments
Comment #1
klonosI realize there's talk about dropping IE8 support in D8, but wouldn't this work in IE8 too if a polyfill (like matchmedia.js for example) was used?
Comment #2
effulgentsia commentedIn #1465948: [meta] Drop some IE8 coddling from Drupal core and #1645494: Allow core themes to display single-column on IE8: do not compensate for lack of media query support, we decided that it is not core's responsibility to compensate for IE8's lack of media query support: that IE8 falling back to mobile layouts (and by extension, image variants) is ok. So I'd like to restate #1 as: if a contrib module like Respond.js were enabled, would the picture polyfill work on IE8, or would something else be needed, and if so, what?
Comment #3
attiks commented#1 the polyfill uses matchmedia.js to do its magic, but mactmedia only works on browser that support media queries
#2 at least for picture the fallback can be choosen, it defaults to mobile, but can be changed. Some themes (like omega) use something comparable to fix the IE9- problem.
Respond.js has adds limited support for media queries in IE9-: "support for min-width and max-width CSS3 media queries" and it adds extra request to analyze the css, so it will not work with most media queries. AFAIK there's no proper way to add support to those browsers, unless we write something on our own.
Comment #4
wilto commentedHey, just figured I’d chime in. I know supporting IE8 is a much larger discussion, but as far as Picturefill goes: Scott Jehl, Paul Irish, and Nicholas Zakas whipped-up an awesome
matchMediapolyfill that we’ve thoroughly tested with Picturefill.https://github.com/scottjehl/matchMedia.js
Comment #5
attiks commentedTargeting IE8 is possible if you build your media query in the right way: "screen, all and (min-width: 560px) and (max-width:850px)" can be used to target IE8/IE7
The demo is updated as follows:
Comment #6
attiks commentedpatch, sandbox at http://drupal.org/sandbox/attiks/1800924, branch
Comment #8
attiks commentedTests will keep failing since this depends on breakpoints functionality #1734642: Move breakpoint module into core
Comment #9
attiks commentedNew patch including the breakpoint patch so it can be tested.
Comment #10
attiks commentednew patch after renaming of breakpoint, also added tests for picture output
Comment #11
attiks commentedmissed one rename
Comment #12
attiks commentedmore renaming, feel free to review the picture part
Comment #13
attiks commentednew patch, removing wrapper functions
Comment #14
attiks commentednew patch, using latest version of the breakpoint patch
Comment #15
attiks commentedsome minor fixes
Comment #17
attiks commentedComment #18
attiks commentedComment #19
attiks commentedProposal can be found at http://wilto.github.com/draft-prop/ResponsiveImages.html
At the bottom of that page you can find all open issues.
Comment #20
attiks commentedImplemented display formatter as plugin #1785748: Field formatters as plugins
Comment #21
attiks commentedPatch against core now that breakpoint is added.
Firstly for the bot, but feedback appreciated.
Comment #22
attiks commentedoops
entity_create
move to page callback
new line
add hook_help
add something for duplicate as well
should an uncompressed copy be added as well?
Comment #23
attiks commentednew patch for #22
Comment #23.0
attiks commentedUpdated issue summary.
Comment #24
attiks commentedNew patch using matchmedia from #1815602: Introduce a polyfill for matchMedia
Comment #25
shyamala commentedAs I understand the Picture module facilitates mapping of image caches to different groups of breakpoints.
Steps followed to configure Picture module and test the same:
The Configured breakpoints did not seem to apply! Is there any configuration that I have missed?
Comment #26
attiks commentedYou need to apply to patch from #1815602-43: Introduce a polyfill for matchMedia that should fix it.
If that doesn't help, can you paste the output of the picture?
Thanks
Comment #27
shyamala commentedOutput for the picture:
Also attached screen shot of configuration & updated steps at #25
Comment #28
attiks commented#27 that output is the default image output, did you press 'Save' on admin/structure/types/manage/article/display after changing it to picture?
Comment #29
shyamala commentedLooks like I did not click on save. It's working fine now.
Shouldn't there must be an alert to the user requesting him to click on save? I only used the update button!
Works perfectly on all breakpoints.
Comment #30
shyamala commentedWorks perfectly on following the steps at #25.
Comment #31
attiks commented#29 I think a message would be fine, but it's a problem with all field formatters, can you create a new issue for it?
BTW thanks for testing.
Comment #32
webchickI believe we need #1815602: Introduce a polyfill for matchMedia in first, so marking this postponed.
Comment #33
attiks commentedmatchmedia polyfill is committed, back to NR for an in depth code review
Comment #34
attiks commentedThis needs a reroll because of #1763974: Convert entity type info into plugins
Comment #35
attiks commentedThis needs a reroll because of #1763974: Convert entity type info into plugins
Comment #36
attiks commentedNew patch without hook_entity_info
Comment #38
tim.plunkett#36: picture-36.patch queued for re-testing.
Comment #40
attiks commentedNew patch to fix the test use statements
Comment #42
attiks commentedgrrrr
Comment #44
attiks commentedwe're getting there.
Comment #46
attiks commentedbot failing on userpicture
Comment #47
attiks commentedthank you bot ;-)
Comment #48
moshe weitzman commentedTested this and it works really nicely. This is going to be fantastic.
Duplicate Doxygen
Comment #49
larowlanIf you reroll for #48
+ // Create user. + $this->admin_user = $this->drupalCreateUser(array('administer pictures', 'access content', 'access administration pages', 'administer site configuration', 'administer content types', 'administer nodes', 'create article content', 'edit any article content', 'delete any article content', 'administer image styles')); + $this->drupalLogin($this->admin_user);Can these go one per line as per coding standards
Oh and this is awesome btw!
Comment #50
attiks commentedNew patch addressing #48, #49
Comment #51
moshe weitzman commentedThanks
Comment #52
webchickLike we did with mediaMatcher, let's point this at a Drupal URL rather than a github URL for one specific individual (especially one with "proposal" in the name :D)
We need to make sure these functions all have PHPDoc above them, as well as @param / @return docs. Part of the docs gate.
Apart from this, great work! happy to commit it. :)
Comment #53
attiks commentednew patch addressing #52 and some white space issues.
Back to RTBC.
Comment #54
webchickCommitted and pushed to 8.x. YAY! :D
Comment #55
yched commentedCouple remarks on the code that got committed :
Whitespace slipped in.
indent issue - and not clear where that if block ends
leftover commented line ?
Why should this have a dependency on config.module ? config.module is only about config UI, not about the config system
Sentence should be capitalized
Ditto.
Ditto, plus missing trailing point - plus, that's not a real sentence :-)
Comment #56
tim.plunkettAlso, can the picture.info description be expanded past "Picture element"? That doesn't tell me much.
Comment #57
eric_a commentedNeeds a follow-up for coding standard issues.
All of these should be like:
More of these around that should be third person.
Comment #58
eric_a commentedCross post. Restoring status.
Comment #59
attiks commentedworking on this
Comment #60
attiks commentedNew patch for #55, #56 and #57
Comment #61
tim.plunkettI don't know if the bot can read that patch, but I can't. :)
Comment #62
attiks commented#61 A more readable version
Comment #63
attiks commentedComment #64
yched commentedlooks good, thanks !
(checked with @alexpott that picture and breakpoint indeed have no reason to depend on config.module)
Comment #66
attiks commentedretested, bot is a bit sleepy
Comment #67
yched commentedgreen
Comment #68
attiks commentedI reviewed the documentation with @jhodgdon
Comment #69
attiks commentedStill RTBC if bot is happy.
Comment #70
tim.plunkettNote: The interdiff is backwards :)
But the current patch looks good.
Comment #71
webchickCommitted and pushed to 8.x.
Comment #72
attiks commentedFYI: Follow up created to handle AJAX requests: #1836860: Picture doesn't work with AJAX callback
Comment #74
moshe weitzman commentedDo we have issues open for actually using this by default? I would think we want to ship with picture enabled in standard install and picture formatter on the image fields in Article content type and on User entity (i.e. user picture).
Comment #75
attiks commented#74 AFAIK there are no issues created yet, it would be nice to enable and use it by default.
Comment #76
attiks commented#74 see #1855412: Enable responsive_image.module by default for standard install profile
Comment #76.0
attiks commentedUpdated issue summary.