-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bugfix: hide artifacts when setting changes #456
Conversation
✅ Deploy Preview for prefect-graphs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@brandonreid For things like edges we actually remove them rather than just hiding them. Is there a specific reason you're hiding them for this? |
@pleek91 Updated to remove artifacts and events when either are hidden. Originally, given that these are rendered in multiple places (root run, on subflows, on nodes) it felt like less places to maintain hiding things to use visibility on the element's factory rather than each parent checking and removing. After trying it though, it actually cleans up some things for the parents and seems better, nice to not have hidden things on the stage as well. |
artifactsContainer = new Container() | ||
} | ||
|
||
container.addChild(artifactsContainer) |
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 did double check this. Adding something to a container that has already been added won't add a duplicate instance or anything. Pixi will shift it to the bottom of the children list, nbd though as we're generally assigning z-indexes for these anyway. Looked around to make sure toggling doesn't shift anything behind other things unintentionally and all looks good.
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.
LGTM!
src/factories/flowRunArtifact.ts
Outdated
@@ -107,7 +107,7 @@ export async function flowRunArtifactFactory<T extends ArtifactFactoryOptions>(o | |||
const centeredX = x - (element.width - selectedOffset) / 2 | |||
const y = application.screen.height | |||
- (element.height - selectedOffset) | |||
- (flowHasEvents ? eventTargetSize : flowStateSelectedBarHeight) | |||
- (flowHasEvents && !settings.disableEvents ? eventTargetSize : flowStateSelectedBarHeight) |
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.
super nit: I'd try and avoid turnaries inside of logical operations for readability purposes. Creating a cost for eventsOffset
or something would make this much easier to grok.
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 appreciate all the nits dood. Updated. 🙏
No description provided.