-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[XY] Add xExtent validation within expression #134546
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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
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, just one small nit
@@ -136,6 +144,20 @@ export const validateExtentForDataBounds = ( | |||
} | |||
}; | |||
|
|||
export const validateXExtent = ( | |||
extent: AxisExtentConfigResult | undefined, |
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: extent?: AxisExtentConfigResult
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 have to invert the arguments order to set the optional argument
export const validateXExtent = (
dataLayers: Array<DataLayerConfigResult | CommonXYDataLayerConfig>,
extent?: AxisExtentConfigResult
) => {
...
Usually I prefer to have as first argument what it needs to be validate, and as subsequent arguments supporting utilities/objects.
Summary
Fixes partially #129308
This PR adds some validation for the new
xExtent
arg to improve Canvas users experience.Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers