Last modified: 2014-01-29 20:48:46 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 T37335, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35335 - Vector: Add SVG version of the watch star icon
Vector: Add SVG version of the watch star icon
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.23.0
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Mateusz Maćkowski
gci2013 https://www.mediawiki.org/wik...
: easy
Depends on:
Blocks: hidpi 44881
  Show dependency treegraph
 
Reported: 2012-03-19 23:14 UTC by Brion Vibber
Modified: 2014-01-29 20:48 UTC (History)
15 users (show)

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


Attachments
Screenshot on mediawiki.org on iPad w/ Retina display (413.84 KB, image/png)
2012-03-19 23:14 UTC, Brion Vibber
Details
Unwatched svg (908 bytes, image/svg+xml)
2013-10-15 18:49 UTC, May
Details
Unwatched PNG (1.45 KB, image/png)
2013-10-15 18:49 UTC, May
Details
Watched SVG (660 bytes, image/svg+xml)
2013-10-15 18:50 UTC, May
Details
Watched PNG (1.12 KB, image/png)
2013-10-15 18:50 UTC, May
Details

Description Brion Vibber 2012-03-19 23:14:38 UTC
Created attachment 10276 [details]
Screenshot on mediawiki.org on iPad w/ Retina display

The star icon for watch in Vector skin's icon-watch mode is a low-resolution raster image, visibly pixelated on high-resolution screens such as the new iPad with Retina display, or when zooming in in the browser.

Recommend replacing with SVG and PNG/GIF fallback if possible.

Note that the star spins, so the GIF animation would need to be either replaced with a higher-resolution GIF or by animating the SVG image.
Comment 1 Daniel Friesen 2012-03-20 03:51:40 UTC
This was a JS feature, we should be able to handle this a bit easier than the static stuff.

The animation is nothing but a spin, right? Instead of trying to continue using horrible gifs or animate SVG in a way that probably won't be supported. How about we try using css?
Most browsers with .svg support should support css3-animations.

We can detect animation support + .svg support. If the browser supports both then we'll use a .svg image and animate it with a css3-animation. Otherwise we'll just use the .gif.
Comment 2 Lejonel 2012-04-08 12:19:26 UTC
A solution could be to replace the icon with plain text. That also solves the problem that a star has no obvious relation to watching articles.
Comment 3 Quim Gil 2013-09-28 05:42:27 UTC
fwiw bug 54307 proposes to substitute the current desktop star for the mobile star.
Comment 4 May 2013-10-15 18:49:26 UTC
Created attachment 13489 [details]
Unwatched svg
Comment 5 May 2013-10-15 18:49:58 UTC
Created attachment 13490 [details]
Unwatched PNG
Comment 6 May 2013-10-15 18:50:14 UTC
Created attachment 13491 [details]
Watched SVG
Comment 7 May 2013-10-15 18:50:43 UTC
Created attachment 13492 [details]
Watched PNG
Comment 8 Daniel Friesen 2013-10-15 19:16:58 UTC
I'm even more inclined to think we should be using css3 animations instead of an animated .gif for this now.

I did a little testing on the watch icon and there is a notable performance difference between the use of a .gif and a css3 animation.
A single running animated .gif makes Chrome on my computer renders the page at ~33FPS. While using a proper css3 animation instead renders at the complete 55-60FPS.

.gifs are inefficient. Because they are image frame based rather than a simple instruction like "rotate this" the browser has to re-draw images for each frame. As a result a css3 animation which gets to use the GPU to make simple modifications will always perform better. And will also do a much smoother animation. (Fixed frame list vs. a rotation that can create a frame for any point in the rotation and animate at the refresh rate).
Comment 9 Mayank Madan 2013-11-19 07:29:32 UTC
The star icon is changed but it still gets pixelated when zoomed in on a browser.
Chromium 28.0.1500
Comment 10 Quim Gil 2013-11-24 01:13:01 UTC
Nandakumar, a Google Code-in student, has a zip file with an SVG star and an HTML file to animate it at http://www.google-melange.com/gci/task/view/google/gci2013/5909942108160000

I have asked the student to submit a Gerrit change, but while he learns to do this, could you please check the zip file and comment? Isn't the animation too slow, or is this related with thefull screen size of the start I see when opening the file?
Comment 11 Brion Vibber 2013-11-24 14:53:53 UTC
The animation is set to 10s, which seems pretty slow (in terms of total time). It also renders kind of slowly for me (poor frame rate), which is probably because it's a 1000x1000 image instead of the intended size. :)

Recommend:
* don't embed the SVG in the HTML; the SVG file should be loaded as a background image via CSS, so we can let it fall back to a PNG version for some older browsers
* size should match the current size
* shorten the animation duration to match the current animation
* only run the animation once, not continuously
* when the animation completes, the star needs to change state
* needs to be integrated into the actual stylesheets
Comment 12 Gerrit Notification Bot 2013-12-03 18:12:28 UTC
Change 98856 had a related patch set uploaded by M4tx:
Add an SVG version of watch icon

https://gerrit.wikimedia.org/r/98856
Comment 13 Quim Gil 2013-12-03 18:26:39 UTC
The Gerrit changeset linked above has been submitted by a GCI student. Please help reviewing it.
Comment 14 Gerrit Notification Bot 2013-12-04 22:15:52 UTC
Change 99258 had a related patch set uploaded by M4tx:
Add an SVG version of watch icon

https://gerrit.wikimedia.org/r/99258
Comment 15 Gerrit Notification Bot 2013-12-27 02:03:30 UTC
Change 98856 abandoned by Bartosz Dziewoński:
Add an SVG version of watch icon

Reason:
OK, let's abandon this in favor of https://gerrit.wikimedia.org/r/#/c/99258/ then. (You can do it yourself by clicking the "Abandon Change" button.)

https://gerrit.wikimedia.org/r/98856
Comment 16 Quim Gil 2014-01-28 04:36:42 UTC
According to an informal chat with Bartosz and Timo at the Architecture Summit,  https://gerrit.wikimedia.org/r/#/c/99258/ is ready. Can someone with +2 review it and eventually merge it, please?
Comment 17 Gerrit Notification Bot 2014-01-29 20:46:03 UTC
Change 99258 merged by jenkins-bot:
Add an SVG version of watch icon

https://gerrit.wikimedia.org/r/99258
Comment 18 Bartosz Dziewoński 2014-01-29 20:48:46 UTC
Done now. Yay!

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


Navigation
Links