Last modified: 2014-02-12 23:47:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43288, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41288 - MF beta high-DPI/responsive images don't trigger in sections beyond the summary
MF beta high-DPI/responsive images don't trigger in sections beyond the summary
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
beta (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Jon
http://test.m.wikipedia.org/wiki/San_...
:
: 41287 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-22 23:14 UTC by Brion Vibber
Modified: 2014-02-12 23:47 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2012-10-22 23:14:55 UTC
* on an iPhone 4 or equivalent high-DPI device:
* Go to http://test.m.wikipedia.org/wiki/San_Francisco
* open "Culture and contemporary life" section
* scroll down a bit to the photo of SFMOMA

High-DPI responsive images aren't being loaded in sections beyond the summary section. The SFMOMA photo in the San Francisco 'Culture' section should show a lot of detail on the diagonal lines on the central circular slanted roof, but shows blurry and pixelated instead.

Probably needs an explicit call to $(...).hidpi() in the appropriate event handler after loading the sections.

This is likely closely related to bug 41287.
Comment 1 Jon 2012-12-21 18:14:29 UTC
The event 'mw-mf-section-rendered' is triggered after a section has rendered
$( window ).on('mw-mf-section-rendered', function( ev, container) {
$( container ).find( ... ).hidpi();
} );
should fix this?
Not sure how to use hidpi though - can you point me at the code or look into this yourself?
Comment 2 Brion Vibber 2012-12-21 19:07:02 UTC
The hidpi code is in core:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/jquery/jquery.hidpi.js;h=70bfc4ea3c664570102bd697140912fedfd98373;hb=HEAD

$(foo).hidpi applies the 'srcset' stuff to any <img> elements found within the given selection, so assuming container is the container for the newly shown section this should work:

$( window ).on('mw-mf-section-rendered', function( ev, container) {
  $( container ).hidpi();
} );

It should be idempotent if run over the same DOM subtree twice, so it should be safe to run it multiple times if need be.
Comment 3 Jon 2012-12-24 17:46:20 UTC
 https://gerrit.wikimedia.org/r/40326
Comment 4 Jon 2012-12-26 23:17:40 UTC
*** Bug 41287 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links