-
Notifications
You must be signed in to change notification settings - Fork 885
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
[Data Explorer] Allow render from View directly, not from Data Explorer #6167
Conversation
109ee0a
to
c938c50
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6167 +/- ##
==========================================
- Coverage 67.44% 67.42% -0.03%
==========================================
Files 3444 3445 +1
Lines 67849 67791 -58
Branches 11035 11026 -9
==========================================
- Hits 45764 45705 -59
Misses 19418 19418
- Partials 2667 2668 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
the issue with this approach is that when the user changes the query, the current context is lost. In 2.9 the lable once rendered does not change until eother the new result comes in or there are no results |
ccb56a7
to
7965656
Compare
if history is the reason for the rerender, cant we just move it out of the props? |
This PR avoids re-rendering the entire AppContainer when data services update. The re-render is caused by history object which is in AppMountParameters. This history object is part of the application's routing context and can change frequently as the url is updated by query, filter or time range. Each change in the history object could potentially trigger a re-render of the AppContainer and its child components. With this PR, the AppContainer will not be re-loaded. Instead each component, like Canvas and Panel, will be updated. Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Due to opensearch-project/OpenSearch-Dashboards#6167, we don't have the double render issue when global state is updated. Therefore we don't need to call makeDatePickerMenuOpen function, which is just to reclick the DatePickerToggle to make the menu re-open. This function is a tmp solution to allow test passing. In this PR, we will remove the function and all the usages. Signed-off-by: Anan <ananzh@amazon.com>
@kavilla I have fixed the test in opensearch-project/opensearch-dashboards-functional-test#1358 Since we don't have double render, the tmp solution
, which is just to re-click the DatePickerToggle to make the menu re-open, is not required. We could just simply remove this tmp fix. after.mp4 |
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
[MANUAL CYPRESS TEST RUN RESULTS]✅ Cypress test run succeeded!Inputs:
Link to results:https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/9389954391 |
Due to opensearch-project/OpenSearch-Dashboards#6167, we don't have the double render issue when global state is updated. Therefore we don't need to call makeDatePickerMenuOpen function, which is just to reclick the DatePickerToggle to make the menu re-open. This function is a tmp solution to allow test passing. In this PR, we will remove the function and all the usages. Signed-off-by: Anan <ananzh@amazon.com>
Due to opensearch-project/OpenSearch-Dashboards#6167, we don't have the double render issue when global state is updated. Therefore we don't need to call makeDatePickerMenuOpen function, which is just to reclick the DatePickerToggle to make the menu re-open. This function is a tmp solution to allow test passing. In this PR, we will remove the function and all the usages. Signed-off-by: Anan <ananzh@amazon.com> (cherry picked from commit 2881c0f)
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: A better home for this is @osd/std.
Due to opensearch-project/OpenSearch-Dashboards#6167, we don't have the double render issue when global state is updated. Therefore we don't need to call makeDatePickerMenuOpen function, which is just to reclick the DatePickerToggle to make the menu re-open. This function is a tmp solution to allow test passing. In this PR, we will remove the function and all the usages. Signed-off-by: Anan <ananzh@amazon.com> (cherry picked from commit 2881c0f) Co-authored-by: Anan Zhuang <ananzh@amazon.com>
…er (#6167) * [Discover] Remove double render This PR avoids re-rendering the entire AppContainer when data services update. The re-render is caused by history object which is in AppMountParameters. This history object is part of the application's routing context and can change frequently as the url is updated by query, filter or time range. Each change in the history object could potentially trigger a re-render of the AppContainer and its child components. With this PR, the AppContainer will not be re-loaded. Instead each component, like Canvas and Panel, will be updated. Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comment Signed-off-by: Anan Zhuang <ananzh@amazon.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> (cherry picked from commit b792242) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…er (#6167) (#6959) * [Discover] Remove double render This PR avoids re-rendering the entire AppContainer when data services update. The re-render is caused by history object which is in AppMountParameters. This history object is part of the application's routing context and can change frequently as the url is updated by query, filter or time range. Each change in the history object could potentially trigger a re-render of the AppContainer and its child components. With this PR, the AppContainer will not be re-loaded. Instead each component, like Canvas and Panel, will be updated. --------- (cherry picked from commit b792242) Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Due to opensearch-project/OpenSearch-Dashboards#6167, we don't have the double render issue when global state is updated. Therefore we don't need to call makeDatePickerMenuOpen function, which is just to reclick the DatePickerToggle to make the menu re-open. This function is a tmp solution to allow test passing. In this PR, we will remove the function and all the usages. Signed-off-by: Anan <ananzh@amazon.com>
Description
This PR avoids re-rendering the entire AppContainer when data services update. The re-render is caused by history object which is in AppMountParameters. This history object is part of the application's routing context and can change frequently as the url is updated by query, filter or time range. Each change in the history object could potentially trigger a re-render of the AppContainer and its child components.
With this PR, the AppContainer will not be re-loaded. Instead, each component, like Canvas and Panel, will be re-rendered based on the updates from data.
Issues Resolved
NA
Screenshot
Screen.Recording.2024-03-18.at.1.37.25.PM.mov
Changelog
Check List
yarn test:jest
yarn test:jest_integration