Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7099)

Issue 9975047: Display category icon vs default if none provided

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by rharding
Modified:
10 years, 10 months ago
Reviewers:
mp+167340, jeff.pihach, curtis
Visibility:
Public.

Description

Display category icon vs default if none provided - Add pngs of the icons at the sizes we require for display. - Update the charm-token to determine if it needs to display the category icon and if so, generate the correct sprite class name. - Add an if_eq handlebars helper so that we can directly check the size of the token and generate the right class for the sprite. - Add support to the charm details page to display the category icon - Add the categories and the mainCategory to the model - Add tests around the handlebars helper and generation of the classnames. Notes: Does not currently handle the issue of multiple categories on a charm though we do support that in the data. It's not currently used and requires a lot more logic and thinking through to determine which category to display in different cases. Potential follow-up if it becomes an issue. https://code.launchpad.net/~rharding/juju-gui/category-icon-fallback/+merge/167340 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Display category icon vs default if none provided #

Total comments: 8

Patch Set 3 : Display category icon vs default if none provided #

Unified diffs Side-by-side diffs Delta from patch set Stats (+764 lines, -12 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A app/assets/images/charm-app-servers-160.png View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-app-servers-64.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-app-servers-96.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-applications-160.png View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-applications-64.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-applications-96.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-cache-proxy-160.png View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-cache-proxy-64.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-cache-proxy-96.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-databases-160.png View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-databases-64.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-databases-96.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-file-servers-160.png View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-file-servers-64.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-file-servers-96.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-misc-160.png View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-misc-64.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/charm-misc-96.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/non-sprites/category-app-server.svg View 1 chunk +124 lines, -0 lines 0 comments Download
A app/assets/images/non-sprites/category-application.svg View 1 chunk +90 lines, -0 lines 0 comments Download
A app/assets/images/non-sprites/category-cache-proxy.svg View 1 chunk +119 lines, -0 lines 0 comments Download
A app/assets/images/non-sprites/category-database.svg View 1 chunk +115 lines, -0 lines 0 comments Download
A app/assets/images/non-sprites/category-file-server.svg View 1 chunk +74 lines, -0 lines 0 comments Download
A app/assets/images/non-sprites/category-misc.svg View 1 chunk +90 lines, -0 lines 0 comments Download
M app/models/charm.js View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
M app/subapps/browser/templates/browser_charm.handlebars View 1 2 1 chunk +8 lines, -2 lines 0 comments Download
M app/templates/charm-token.handlebars View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M app/views/utils.js View 1 chunk +14 lines, -0 lines 0 comments Download
M app/widgets/charm-token.js View 1 chunk +10 lines, -0 lines 0 comments Download
M lib/views/browser/charm-full.less View 1 chunk +5 lines, -5 lines 0 comments Download
M lib/views/browser/charm-token.less View 2 chunks +2 lines, -0 lines 0 comments Download
M test/test_browser_charm_details.js View 1 2 17 chunks +37 lines, -23 lines 0 comments Download
M test/test_charm_token.js View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
M test/test_utils.js View 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rharding
Please take a look.
10 years, 10 months ago (2013-06-04 16:49:23 UTC) #1
rharding
Please take a look.
10 years, 10 months ago (2013-06-04 16:52:59 UTC) #2
jeff.pihach
LGTM with a few improvements in the tests. I do not think we should have ...
10 years, 10 months ago (2013-06-04 17:07:48 UTC) #3
curtis
LGTM. I have a grammatical fix request inline and implementation suggestion to add to Jeff's ...
10 years, 10 months ago (2013-06-04 17:47:35 UTC) #4
rharding
10 years, 10 months ago (2013-06-05 12:35:01 UTC) #5
*** Submitted:

Display category icon vs default if none provided

- Add pngs of the icons at the sizes we require for display.
- Update the charm-token to determine if it needs to display the category icon
and if so, generate the correct sprite class name.
- Add an if_eq handlebars helper so that we can directly check the size of the
token and generate the right class for the sprite.
- Add support to the charm details page to display the category icon
- Add the categories and the mainCategory to the model
- Add tests around the handlebars helper and generation of the classnames.

Notes:
Does not currently handle the issue of multiple categories on a charm though
we do support that in the data. It's not currently used and requires a lot
more logic and thinking through to determine which category to display in
different cases. Potential follow-up if it becomes an issue.

R=jeff.pihach, curtis
CC=
https://codereview.appspot.com/9975047
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b