-
Notifications
You must be signed in to change notification settings - Fork 91
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
Adds icon-status component #815
Adds icon-status component #815
Conversation
@AllenBW any possible screenshots here? I would like to see it |
@Loicavenel yeah when we're outta [wip] there will be all da goodies 👍 🌮 but if ya were wondering what the icons look like... |
6d4f636
to
d0c4755
Compare
@Loicavenel outta wip! GO GO GO GO GO 💃 |
A few thoughts...
@serenamarie125 thoughts on those? (see attached screenshot) |
@@ -12,8 +12,8 @@ <h3 translate>Results</h3> | |||
<div class="form-group"> | |||
<label class="control-label col-sm-3" translate>Status</label> | |||
<div class="col-sm-8"> | |||
<input class="form-control text-capitalize" readonly | |||
value="{{item.stack.status || ('Unknown' | translate)}}"/> | |||
<icon-status status="item.stack.status" success="['successful', 'succeeded', 'create_complete']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to define the stings here? That could become a VERY long list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presently not a long list, hence the deliberate inclusion for this first run. If it gets much longer tho you're spot on, const in the js is gonna be da way to play
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question about these strings being passed into the component, do we have to worry about those strings being translated and having that ruin the functionality they are meant for?
@chriskacerguis RIGHT!! icon alignment yo, used all things pitched by pf tho so.... idk :-/ i guess we could add custom class to get em all aligned, but that seems like the bandaid for the wrong problem... |
@ManageIQ/core-ux for ya'lls review :) |
/cc @Loicavenel |
Just for my clarification, are these status icon are for when Service is provisioned only? or for any actions done at the service level? |
@AllenBW I think there may be a mixup regarding the icons used for Is it possible for an item to have two different status icons at the same? If not, then I don't think the size issue is severe enough to warrant specific code to fix it unless it causes other items to shift around on the page. I do agree, however, that the size discrepancy in the icons is unfortunate. Your thoughts @serenamarie125? |
good catch, the mixup was pr description deep, eyyyyooo @cshinn swapped them around 🙇♀️ its technically possible for an item to have more than one icon at a time, this is by design, but one would have to deliberately desire this behavior (and code towards it) most of the time and in this pr, one icon per status. does not affect any other items in page, just looks a lil off when ya line em all up 😆 @Loicavenel icons can be used anywhere, application of this pr is an ansible service. |
happened again. I swear i must not hit "COMMENT" after commenting. Couple of comments
HTH! |
@serenamarie125 any update for us? /cc @Loicavenel |
@chriskacerguis the current update is that PatternFly does not have appropriate icons at this point. IMO, we have 2 options |
@serenamarie125 i vote temp! :P |
@AllenBW temp will work...I think it would be a better UX with PF icons...@serenamarie125 would you be able to give a more definitive timeline? |
Based on the fact that PF does not currently have standards for queued, in progress & unknown, I'd like to suggest one of 2 things: If #2, i think we should pick a different icon for queued, because i don't think that one makes sense. Let me know your thoughts @chriskacerguis @Loicavenel |
This pull request is not mergeable. Please rebase and repush. |
@AllenBW can you do me a favor and explain what the Queued status reflects in this instance? Is it the same as pending ? my concern with the clock icon is that users may confuse it with "scheduled" |
@chriskacerguis is 2-3 weeks enough of a timeline? It will be added to our sprint planning, and our 2 week sprint will begin on 6/27 so I anticipate it being completed that sprint. |
@serenamarie125 that works great, I think that it would be a better experience to have matching icons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this PR to use fa-hourglass-half for queued? And I will create a new Issue and link to the JIRA story about the PF suggested icons
@serenamarie125 updated! 🎖 ⚓️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AllenBW would be nice if screenshots were updated to reflect code :)
Thanks for making change to hourglass, i 👀 it in the code!
Takes 5 parameteres - status - string of the current status - success - array of strings for which to display the success icon - error - array of strings for which to display the error icon - queued - array of strings for which to display the circle clock icon - inprogress - array of strings for which to display the in progress spinner If none of the following inputs match the status, the unknown icon will be displayed
Supporting succeeded/successful strings for green icon And failed/failure strings for red icon
403e4d1
to
ff26362
Compare
ff26362
to
eec8d3c
Compare
Checked commits AllenBW/manageiq-ui-service@655a7ff~...eec8d3c with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AllenBW , see below for the review comments I made.
inprogress: '<?', | ||
}, | ||
template: ` | ||
<i class="pficon pficon-ok" ng-if="vm.isSuccess" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could make this template a lot more concise. I would make one icon and write a function in the component that returns the CSS class to show and just use ng-class to display the resulting css class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally verbose, favoring readability rather than conciseness, as was demonstrated above, likely these values are going to change
One below, don't have to worry about translations breaking functionality value and check value(s) are passed by the user, most often specified by the backend for both
@@ -12,8 +12,8 @@ <h3 translate>Results</h3> | |||
<div class="form-group"> | |||
<label class="control-label col-sm-3" translate>Status</label> | |||
<div class="col-sm-8"> | |||
<input class="form-control text-capitalize" readonly | |||
value="{{item.stack.status || ('Unknown' | translate)}}"/> | |||
<icon-status status="item.stack.status" success="['successful', 'succeeded', 'create_complete']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question about these strings being passed into the component, do we have to worry about those strings being translated and having that ruin the functionality they are meant for?
https://www.pivotaltracker.com/story/show/146029083
TL;DR
icon-status
, give it a status and array of possible values for different statuses, and you got ICONS 👶Takes 5 parameters ; and the icon class name pulled from here
pficon pficon-ok
pficon pficon-error-circle-o
fa fa-clock-o
spinner spinner-xs spinner-inline
If none of the following inputs match the status, the unknown icon will be displayed;
pficon pficon-help
Examples of icons used
The unknown catchall
String values are still shown to user