Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quadicons under service catalogs #971

Merged
merged 1 commit into from
Apr 20, 2017

Conversation

hayesr
Copy link
Contributor

@hayesr hayesr commented Apr 7, 2017

The change in decorators effects how this quadicon determines which icon to display. This changes the single quadicon to check for the return of fileicon explicitly since item.decorate will usually (always?) be true.

Before
screen shot 2017-04-07 at 4 16 53 pm

After
screen shot 2017-04-07 at 4 16 15 pm

@epwinchell Can you confirm this is the correct rendering?

Addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=1439517

@@ -561,8 +560,8 @@ def render_ems_cluster_quadicon(item, options)
def render_non_listicon_single_quadicon(item, options)
output = []

img_path = if item.decorate
item.decorate.try(:fileicon)
img_path = if item.decorate.try(:fileicon)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try try 😆 🤣

item.try(:decorate).try(:fileicon) || "100/#{item.class.base_class.to_s.underscore}.png"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate these long lines, but ok :)

@epwinchell
Copy link
Contributor

Aside, from @skateman's comment, this is good to go.

@epwinchell
Copy link
Contributor

@miq-bot assign @dclarizio

@miq-bot miq-bot assigned dclarizio and unassigned epwinchell Apr 17, 2017
@dclarizio
Copy link

@hayesr let me know when you've addressed the comment above.

@hayesr hayesr force-pushed the fix_catalog_quad branch from 005b420 to 35b2877 Compare April 19, 2017 16:51
@hayesr
Copy link
Contributor Author

hayesr commented Apr 19, 2017

@dclarizio Should be ready when green.

@miq-bot
Copy link
Member

miq-bot commented Apr 19, 2017

Checked commit hayesr@35b2877 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks good. 🍪

@hayesr
Copy link
Contributor Author

hayesr commented Apr 19, 2017

Restart CI

@hayesr hayesr closed this Apr 19, 2017
@hayesr hayesr reopened this Apr 19, 2017
@hayesr hayesr closed this Apr 19, 2017
@hayesr hayesr reopened this Apr 19, 2017
@dclarizio dclarizio merged commit af4ea85 into ManageIQ:master Apr 20, 2017
@dclarizio dclarizio added this to the Sprint 59 Ending Apr 24, 2017 milestone Apr 20, 2017
simaishi pushed a commit that referenced this pull request Apr 20, 2017
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit a64f1d576ffb854c74ca7525362e63ab5ae981c9
Author: Dan Clarizio <[email protected]>
Date:   Thu Apr 20 03:08:46 2017 -0700

    Merge pull request #971 from hayesr/fix_catalog_quad
    
    Fix quadicons under service catalogs
    (cherry picked from commit af4ea85ae0136a613f8bbc76d59ad63d48b140e0)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1444171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants