-
Notifications
You must be signed in to change notification settings - Fork 919
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: Re-rendering visualization when expression changes and improves typing #1491
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,11 +71,18 @@ export interface ISavedVis { | |
|
||
export interface VisSavedObject extends SavedObject, ISavedVis {} | ||
|
||
export interface VisResponseValue { | ||
export interface VisRenderValue { | ||
title?: string; | ||
visType: string; | ||
visData: object; | ||
visConfig: object; | ||
params?: object; | ||
visData?: object | null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit - do we need to support There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One of the existing visualizations expects a null value for vizData when no data is present. Since I didn't want to introduce a breaking change, I kept the expected types the same and instead just typed the interfaces more strongly. |
||
visConfig: { | ||
type?: string; | ||
[key: string]: any; | ||
}; | ||
params?: { | ||
[key: string]: any; | ||
listenOnChange: boolean; | ||
}; | ||
} | ||
|
||
export interface VisToExpressionAstParams { | ||
|
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.
nit - shouldn't this be
PersistedState
type?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 could. I wasn't a 100% if uiState was always used as PersistedState everywhere. It is used as PersistedState in the viz renderer but other renderers can use other uiState values. To not break anything I just kept the type that was expected everywhere else. I may update this once I can be sure that it won't break anything.