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

Add an exception for middleware server listicons to prefer fileicon #2888

Merged
merged 1 commit into from
Dec 1, 2017

Conversation

skateman
Copy link
Member

Adding exceptions is the worst way of fixing this issue, however, after consulting with @epwinchell I did not find any other option. For now a fonticon has a higher priority than a fileicon which is a problem in the middleware server listview. Eventually we want to swap these priorities, however, we have some legacy fileicons that are PNG based and they should be deleted, but for now the quadicons depend on them. So until we have fonticon support in quadicons, we can't swap the priority and adding this exception seemed the simplest possible solution.

But maybe I'm wrong and @karelhala, @himdel or @martinpovolny could come up with a better idea.

Before:
screenshot from 2017-11-30 20-39-59

After:
screenshot from 2017-11-30 20-40-13

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

@abonas
Copy link
Member

abonas commented Nov 30, 2017

@miq-bot add_label middleware, bug

@martinpovolny
Copy link
Member

martinpovolny commented Nov 30, 2017

Oh my this method is a 💩 But right. We need to refactor this after Gaprindashvili.

@ohadlevy
Copy link
Member

can you add a test please? :) thanks

@martinpovolny
Copy link
Member

martinpovolny commented Dec 1, 2017

@skateman : my first thought seeing @ohadlevy 's comment is "No, not here". Because mocking everything so that you can add a unit test for the simple condition here will result in an ugly test that we will have to rework right in the moment where we start cleaning up this messy method (after Gaprindashvili).

But I suggest that you add a /report_data integration test for the listing of Middeware servers. If you do that using #2727 and not only test the icon, but test that there's data in the listing -- correct number of rows, the right middleware server in the view and on top of that there's the correct icon.

There will be value in the test and it will not need to be an ugly pile of stubs.

Also @abonas and her guys can use that as an example for adding test coverage to other screens with grids under middleware.

Can you do that? Shall I help?

p.s. And such test will stay untouched when we refactor view_to_hash and will actually serve to ensure that we don't break things when we do that.

@skateman skateman force-pushed the middleware-server-listicon branch 2 times, most recently from aba1e67 to 01b14fb Compare December 1, 2017 09:16
@skateman skateman force-pushed the middleware-server-listicon branch from 01b14fb to af0d084 Compare December 1, 2017 09:22
@miq-bot
Copy link
Member

miq-bot commented Dec 1, 2017

Checked commit skateman@af0d084 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. ⭐

@martinpovolny martinpovolny merged commit 0ba0097 into ManageIQ:master Dec 1, 2017
@martinpovolny martinpovolny self-assigned this Dec 1, 2017
@martinpovolny martinpovolny added this to the Sprint 75 Ending Dec 11, 2017 milestone Dec 1, 2017
@martinpovolny
Copy link
Member

@abonas : Gaprindashvili?

@skateman
Copy link
Member Author

skateman commented Dec 1, 2017

@martinpovolny yes, have a BZ for that too
@miq-bot add_label gaprindashvili/yes

@skateman skateman deleted the middleware-server-listicon branch December 1, 2017 10:05
@abonas
Copy link
Member

abonas commented Dec 1, 2017

@martinpovolny yes, definitely gaprindashvili, the bz reflects it correctly.
Thanks all!

simaishi pushed a commit that referenced this pull request Dec 1, 2017
Add an exception for middleware server listicons to prefer fileicon
(cherry picked from commit 0ba0097)

https://bugzilla.redhat.com/show_bug.cgi?id=1510248
@simaishi
Copy link
Contributor

simaishi commented Dec 1, 2017

Gaprindashvili backport details:

$ git log -1
commit 5912d56ad1a03db9c9cc2e0ff0d28210b231d126
Author: Martin Povolny <[email protected]>
Date:   Fri Dec 1 11:00:43 2017 +0100

    Merge pull request #2888 from skateman/middleware-server-listicon
    
    Add an exception for middleware server listicons to prefer fileicon
    (cherry picked from commit 0ba0097ce2319226f756391c33720aa6f182c90c)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1510248

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.

6 participants