Improve the look and implementation of trophies.

Review Request #8324 — Created Aug. 12, 2016 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
99fa716...

Reviewers

This change makes a small handful of improvements to our trophies,
covering the implementation of TrophyType subclasses, the presentation
of trophies, and the look of our standard trophies.

On an implementation level, TrophyType subclasses no longer need to
override __init__, as the metadata for the trophy is now stored in class
attributes. Older subclasses can install provide these through the
constructor, but will get deprecation warnings.

Trophy registration is now based on a standard registry. The existing
methods remain for compatibility, but will show deprecation warnings.

All methods and attributes are now properly documented as well.

On a presentational level, rendering problems with showing multiple
trophies or when there's an unknown trophy have been fixed. Trophies are
also no longer bound to a specific width and height (previously, this
would result in some weird problems with the positioning of the trophy).

Trophies can also provide multiple images for different resolution
levels, allowing for @2x, @3x, etc. trophy images.

The default trophies (fish and sparkly) have been updated with slightly
improved (crisper) visuals and support for Retina images. The sparkly
trophy is now more sparkly, and the fish trophy has a better base and
eye.

Unit tests pass.

Tested that trophies are still properly being calculated and assigned.

Tested that unregistered trophies previously assigned to a review request
no longer breaks the trophy banner.

Tested that multiple trophies renders correctly.

Tested that new-style and legacy trophy subclasses work.

Tested the new trophy images on Retina and non-Retina displays.


    Loading...