-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
ui: move latestQuery
, latestFormattedQuery
from redux to local state
#88510
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.
The idea was not only to save between tab switch, but also if you select a period where the data is not available, we want to at least show the query. With your change, doesn't the state change and the query gets cleanup? Can you test this scenario (go to the details with a period that has info, then select a new period where there is no data on it)?
Reviewable status:
complete! 0 of 0 LGTMs obtained
Yes, that behaviour is still preserved here, we're doing the exact same thing but in the component state instead of redux since this info isn't needed anywhere else in the app. The state is only updated if we receive a different, non-empty query. Included a loom! |
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.
You need to cleanup pkg/ui/workspaces/cluster-ui/src/store/statementDetails/statementDetails.sagas.spec.ts:670:11 to remove the references for latestQuery you remove from SQLDetailsStatsReducerState
Reviewable status:
complete! 0 of 0 LGTMs obtained
Previously, the fields `latestQuery` and `latestFormattedQuery` representing the latest non-empty query string for a statement viewed from the detaisl page was being stored in redux. The purpose of these fields was to preserve the query when changing tabs in the stmt details page. Saving this in the redux store was unnecessary and so this commit moves these fields to the stmt details local state. Release note: None
a29af4a
to
27299e0
Compare
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.
Done
Reviewable status:
complete! 0 of 0 LGTMs obtained
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.
Reviewed 7 of 7 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @xinhaoz)
bors r+ |
Build succeeded: |
Previously, the fields
latestQuery
andlatestFormattedQuery
representing the latest non-empty query string for a statement viewed from the detaisl page was being stored in redux. The purpose of these fields was to preserve the query when changing tabs in the stmt details page. Saving this in the redux store was unnecessary and so this commit moves these fields to the stmt details local state.Release note: None
https://www.loom.com/share/a28d412fb83a429391210935982404de