-
Notifications
You must be signed in to change notification settings - Fork 903
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
fix(core): fix flickering render of stage labels on hydration #7181
fix(core): fix flickering render of stage labels on hydration #7181
Conversation
@@ -165,6 +165,7 @@ export class HoverablePopover extends React.Component<IHoverablePopoverProps, IH | |||
placement={placementOverride || placement} | |||
target={this.targetRef.current} | |||
container={container} | |||
shouldUpdatePosition={true} |
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.
Adding this because we're actually changing the children in the popover (instead of creating an entirely new one), which means we need to recompute its position when children change.
I only 30% understand why this works.
@@ -43,17 +39,7 @@ export class ExecutionMarker extends React.Component<IExecutionMarkerProps, IExe | |||
}; | |||
} | |||
|
|||
private hydrate = (): void => { |
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.
moving this hydration down to the label itself (which already had some redundant hydration code)
@@ -12,7 +12,6 @@ Registry.pipeline.registerStage({ | |||
}, | |||
component: ConcourseStageConfig, | |||
executionDetailsSections: [ConcourseExecutionDetails], | |||
useCustomTooltip: true, |
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.
no it doesn't
template = getExecutionWindowTemplate(); | ||
} else if (suspendedStageTypes.has('waitForCondition')) { | ||
template = getWaitForConditionTemplate(); | ||
} |
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 hate an else if
, but in this case, I think it's fairly clean to read?
This render method was pretty spaghetti'd before and I feel like this refactor makes it a lot easier to grok but I'm biased.
You know the annoying thing where you hover over a stage and you get a loading indicator in a tooltip, and then it just goes away, and you have to mouse out and then back over the stage to see the label? This fixes that.