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

Render sub flow runs #252

Merged
merged 9 commits into from
Oct 19, 2023
Merged

Render sub flow runs #252

merged 9 commits into from
Oct 19, 2023

Conversation

pleek91
Copy link
Collaborator

@pleek91 pleek91 commented Oct 18, 2023

Description

Clicking on a flow run on the graph will the flow run on the graph. Bumping other content out of the way.

For now it just renders right on to of the flow run that was clicked on and you cannot collapse it.

WIP PR to try and keep things a little smaller.

The last node in the demo is a flow run. Clicking on it will render another demo flow on the graph.

image

@pleek91 pleek91 requested a review from a team as a code owner October 18, 2023 21:24
@netlify
Copy link

netlify bot commented Oct 18, 2023

Deploy Preview for prefect-graphs ready!

Name Link
🔨 Latest commit b4cde62
🔍 Latest deploy log https://app.netlify.com/sites/prefect-graphs/deploys/653052cd75b45d0008bbef31
😎 Deploy Preview https://deploy-preview-252--prefect-graphs.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/factories/flowRun.ts Outdated Show resolved Hide resolved
@@ -50,6 +74,7 @@ export async function flowRunContainerFactory() {
}

return {
kind: 'flow-run' as const,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added kind as a a discriminating union for the nodeContainerFactory

Comment on lines -16 to -18
type Events = {
rendered: void,
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the factory specific events in favor of augmenting the built in pixi events. That way I can emit directly on containers which is simpler and avoids some event bubbling.


return Math.max(...values.values(), 0)
return Math.max(...values.values(), config.styles.nodeHeight)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is evolving a bit to factor in the entire row height and not just the "offset" the name of this utility is likely to change to reflect but waiting to see how this shakes out

Comment on lines +41 to +47
function toggle(): void {
open = !open

if (open) {
renderNodes()
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will evolve quite a bit. Just a POC

Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

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

Thanks Craig!

@pleek91 pleek91 merged commit 0edbdce into main Oct 19, 2023
@pleek91 pleek91 deleted the sub-nodes branch October 19, 2023 15:16
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