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

Move StatusConditions component from forklift-ui for reuse in MTC #47

Open
mturley opened this issue Jan 19, 2021 · 0 comments
Open

Move StatusConditions component from forklift-ui for reuse in MTC #47

mturley opened this issue Jan 19, 2021 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@mturley
Copy link
Collaborator

mturley commented Jan 19, 2021

The StatusCondition component in forklift-ui (https://github.com/konveyor/forklift-ui/blob/main/src/app/common/components/StatusCondition.tsx) should be cleaned up and moved here. It's almost generic enough already, but some of the helper function logic is a little redundant and arbitrary in places. If we make it truly be able to handle a generic set of status conditions on any CR, it could be a very useful component.

I think the main pain point is the mapping of condition severities/types to colors/icons. In forklift, there isn't a perfect mapping and we need to make some assumptions that may not match the behavior of other apps. We could improve that default logic but maybe also add a way of passing your own getStatusType function (given a condition object, which icon should we use) in case apps need to override it.

Screen Shot 2021-01-19 at 11 47 27 AM

@mturley mturley added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant