-
Notifications
You must be signed in to change notification settings - Fork 117
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
enh: make viz responsive, remove extra renders, handle err in main window #6629
Conversation
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.
Not sure to get why we don't send the error message back to the main window?
front/components/assistant/conversation/actions/VisualizationActionIframe.tsx
Outdated
Show resolved
Hide resolved
front/components/assistant/conversation/actions/VisualizationActionIframe.tsx
Outdated
Show resolved
Hide resolved
@@ -202,7 +201,9 @@ export function VisualizationActionIframe({ | |||
<div | |||
className={classNames( | |||
"transition-height relative w-full overflow-hidden duration-500 ease-in-out", | |||
codeFullyGenerated ? "min-h-96" : "" | |||
codeFullyGenerated && !errored ? "min-h-96" : "", |
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.
🤔 Don't we want the min height only when we have an error?
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.
(explained on slack)
style={{ | ||
height: !errored ? `${contentHeight}px` : "100%", | ||
minHeight: !errored ? "96" : undefined, | ||
maxHeight: "60vh", |
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.
✂️
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 we need this actually
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.
It's already below set with tailwind, why do we need to duplicate?
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.
Indeed, nvm me 👍
@@ -28,65 +26,14 @@ export class ErrorBoundary extends React.Component< | |||
|
|||
componentDidCatch(error: unknown) { | |||
this.setState({ hasError: true, error }); | |||
this.props.onErrored(); |
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.
Why not passing the error message as we use to?
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.
We don't do anything with it yet
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.
So we'll pass it when we need it
…ndow (#6629) * enh: improve viz responsiveness, remove extra renders, handle error in main * mark last viz as complete on agent message success * naming * nit * remove outdated comment * r --------- Co-authored-by: Henry Fontanier <[email protected]>
Description
setErrored
cross-doc call to set error state on parent window)onLoad
and not relying on iframe to display the error)After this PR, we can release viz
Risk
N/A
Deploy Plan