patternfly / react-topology

MIT License
13 stars 20 forks source link

Allow custom icons for DefaultTaskGroup #240

Closed jpuzz0 closed 1 month ago

jpuzz0 commented 1 month ago

A design requirement for Openshift AI is to allow for BanIcon to be used instead of the default 'Canceled' task icon.

Default presentation for DefaultTaskGroup for the 'Canceled' task node state:
Image

Desired outcome: The warning icon to be replaced by some user defined icon.

The ability to overwrite the mapping for what icons map to what RunStatus at a broader level in a topology view could also be a solution to this problem.

dlabaj commented 1 month ago

@jenny-s51 @jpuzz0 Do you know the urgency of this issue?

jenny-s51 commented 1 month ago

Hi @jpuzz0 ! Topology currently provides support for a customStatusIcon that you can use in TaskNode.tsx.

You can see an example of this in action in our demo app (look for Pipelines -> Task Nodes), where the BanIcon is passed in to the "Custom Status Icon Task" node: https://github.com/patternfly/react-topology/blob/02f6fbe50d82c890b210ad6476d0931710be82ea/packages/demo-app-ts/src/demos/pipelinesDemo/useDemoPipelineNodes.tsx#L284-L285

Does this help with your use case?

jpuzz0 commented 1 month ago

@jenny-s51 I don't think so. I'm using DefaultTaskGroup, not TaskNode. I have no issue with using custom icons for TaskNode.

jpuzz0 commented 1 month ago

@dlabaj

@jenny-s51 @jpuzz0 Do you know the urgency of this issue?

I would consider it normal urgency

andrewballantyne commented 1 month ago

@dlabaj

@jenny-s51 @jpuzz0 Do you know the urgency of this issue?

I would consider it normal urgency

@jpuzz0 and I talked about this in Standup. I feel this is a bit higher than normal as it is confusing to the user to "what is the feedback you want me to get from the warning". I would not consider this critical, but in there is a status between normal and critical I feel it is probably that. Better to fix this than let it linger imo.

jenny-s51 commented 1 month ago

Closed via #246