#26170 closed defect (bug) (fixed)
Replace PNG-based ratings stars with dashicons
Reported by: | iammattthomas | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.8 | Priority: | high |
Severity: | minor | Version: | 3.8 |
Component: | Administration | Keywords: | |
Focuses: | ui | Cc: |
Description
The .star-holder/.star/.star-rating styles used for ratings stars on plugin-install.php should be replaced with the corresponding equivalents in Dashicons.
Attachments (3)
Change History (15)
#3
@
11 years ago
The way the ratings stars are implemented don't allow a simple swap-out of Dashicons for PNGs. Since a solution will require more code-fu than I've got, I've just mocked up how I imagine stars working with Dashicons and the $highlight-color from color schemes.
- Unfilled stars use dashicons-star-empty, glyph \f154. Color is # 777 gray.
- Filled stars use dashicons-star-filled, glyph \f155. Color is $highlight-color, # 0074a2 by default.
#4
@
11 years ago
While we're at this, it might make sense to unify completely and use a helper function instead of maintaining the markup in a couple of places.
#5
follow-up:
↓ 6
@
11 years ago
It's worth noting that moving from our current system to the proposed one here, is that we currently allow "3.5 stars" or "2.9 stars", this would force us to round to 3 or 4 stars.
A compromise might be standardising on empty/half/full stars, so 2.5/3.0/3.5, no 2.9's or 3.4's
#6
in reply to:
↑ 5
@
11 years ago
Replying to dd32:
A compromise might be standardising on empty/half/full stars, so 2.5/3.0/3.5, no 2.9's or 3.4's
I think this is better anyway. As cool as it is having 2.9 stars, I hate seeing it 1px off.
Also, solid +1 on helen's suggestion; I need star markup in a few places, and it's actually been broken about 3/4 times before. Adding this would ensure we don't break in future (yay styling backwards compatibility!).
#7
@
11 years ago
26170.diff is a implementation using Dashicons and a helper function.
Since we don't currently have a half-star, I've just gone with a placeholder of a lighter colour for the .5 star for now.
It completely removes the .star-holder
styling (I went with .star-rating
to avoid conflicts) of past, however we can leave that for back-compat if need be.
With the old styling removed, old-style star ratings simply fail to load, they don't take up space or look bad, they just vanish.
#9
@
11 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 26380:
#10
@
11 years ago
As can be seen, I opted to leave the .star-holder
styling & images for back-compat.
Previously when we altered the stars (HiDPI) we broke the HTML & CSS which plugins had been using, we should avoid doing that again.
I'll pick this task up.