|
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)
Total comments: 8
|
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
|
Total messages: 5
|