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

enhance graph to indicate workflow steps and show active state #656

Conversation

RealZimboGuy
Copy link
Contributor

can change the colours or what is wanted in the css file, the logic is done for the indications.

sample below, red text and underline for current state, then any state-state the arrow is also hi-lighted

image

@eputtone eputtone self-requested a review October 3, 2024 08:04
Copy link
Member

@eputtone eputtone left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Could the color for highlighting the workflow transitions and current state be e.g. blue instead of red? If it's not visible enough for you, maybe increase the size of the highlighting? I associate red with problems / alerts.

Ignoring the color, I could merge this.


}

function hasNavigatedState(fromState, toState, instance) {
Copy link
Member

Choose a reason for hiding this comment

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

A more performant solution might traverse actions only once, and create a set of realized state transition pairs.

Then hasNavigatedState() would be just a lookup to this set, instead of iterating the actions for each transition in workflow definition.

But I can approve this solution as well, because loading wordGenerator (from nflow-tests) instance to the modified Explorer does not fail:
https://nflow.io/dev/index.html#/workflow/3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thats a huge state diagram :) ive changed it to blue as below

image

i did think a bit on the performance side but its browser based and you end up with
(number of workflow states) X(displayed actions (defaults to 100 based on system setting)

overall not too many to worry about (i think)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the performance is sufficient, and there are more important things to polish in Explorer. For instance, we need to migrate from dagre-d3 to something that is being maintained.

Thanks for changing the edge color to blue. I think I'd also slightly prefer blue in the current state highlight, though that's not important for me. I'll merge the PR later today 👍

@eputtone eputtone merged commit 9044c16 into NitorCreations:master Oct 3, 2024
2 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants