-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] fix dimension panel datasource updates #161881
Conversation
a21164a
to
7a0abaa
Compare
syncCursor={config.syncCursor} | ||
/> | ||
</div> | ||
<I18nProvider> |
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.
non related to the main issue, but just saw it in the console and decided to fix
@@ -40,7 +40,7 @@ import { FieldItem } from '../common/field_item'; | |||
|
|||
export type Props = Omit< | |||
DatasourceDataPanelProps<FormBasedPrivateState>, | |||
'core' | 'onChangeIndexPattern' | 'dragDropContext' | |||
'core' | 'onChangeIndexPattern' |
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.
non related to the main issue, but it's a leftover I forgot about
@@ -276,7 +276,7 @@ export function DimensionEditor(props: DimensionEditorProps) { | |||
// changes from the static value operation (which has to be a function) | |||
// Note: it forced a rerender at this point to avoid UI glitches in async updates (another hack upstream) | |||
// TODO: revisit this once we get rid of updateDatasourceAsync upstream | |||
const moveDefinetelyToStaticValueAndUpdate = ( | |||
const moveDefinitelyToStaticValueAndUpdate = ( |
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.
just a typo fix :)
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations) |
7a0abaa
to
16f7476
Compare
75ef956
to
3844b40
Compare
@@ -82,7 +82,6 @@ export interface ReferenceEditorProps { | |||
labelAppend?: EuiFormRowProps['labelAppend']; | |||
isFullscreen: boolean; | |||
toggleFullscreen: () => void; | |||
setIsCloseable: (isCloseable: boolean) => 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.
I removed all code associated with it because seems like this is not needed anymore... I am not sure what changed it but it was introduced 2 years ago with formula editor PR (#99297). The comment says it solves ' Popover steals focus from text input, and doesn't close when clicking the monaco editor. Needs an alternative design', but I couldn't reproduce it and tested quite extensively.
I even checked 7.14 version where formula was introduced and the behavior is the same.
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.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
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.
Tested locally with Safari 👍
Summary
Fixes #161759
Fixes #161854
Fixes #161988
Fixes #161666
This bug surfaced by my change with NativeRenderer removal PR. It happens because sometimes there are two updates happening at the same time, in this case
*
setState
coming from optimizing middleware to update the relative timerange in a call to esTwo updates is not a problem and works correctly for the same case for visualizations etc, but for the
updateDatasourceState
we break one of the fundamental rules of redux by passing non-serializable prop to action (anupdater
function that is then called internally with the previous state). The problem is that in the meantime the state gets updated from the previoussetState
call. To avoid this problem I rewrote theupdateDatasourceState
action to not accept updater function. To avoid these problems in the future I've also included aserializableCheck
that ignores dataViews and some other properties (they contain some non-serializable data, I hope we'll take care of them in the future)I also fixed a few small issues, will leave comments in the code.
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