-
Notifications
You must be signed in to change notification settings - Fork 893
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
[BUG] Make table size adjustable according to table rows and columns #5514
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5514 +/- ##
=======================================
Coverage 67.01% 67.01%
=======================================
Files 3296 3296
Lines 63370 63370
Branches 10093 10093
=======================================
Hits 42465 42465
Misses 18456 18456
Partials 2449 2449
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c3936e2
to
f228a85
Compare
There are two functional tests broken by reload. If we think this could be a tmp fix, I could fix the tests as well. |
d2424ef
to
80cb5bd
Compare
* Provide a unique key prop to the table component to force it to fully re-render when the key changes, which will force table to adjust its size. Issue Resolved opensearch-project#5440 Signed-off-by: Anan Z <ananzh@amazon.com>
@@ -53,6 +53,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | |||
- [Discover] Fix missing index pattern field from breaking Discover [#5626](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5626) | |||
- [BUG] Remove duplicate sample data as id 90943e30-9a47-11e8-b64d-95841ca0b247 ([5668](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5668)) | |||
- [BUG][Multiple Datasource] Fix datasource testing connection unexpectedly passed with wrong endpoint [#5663](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5663) | |||
- [BUG][Discover] Make table size adjustable according to table rows and columns ([#5514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5514)) |
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.
- [BUG][Discover] Make table size adjustable according to table rows and columns ([#5514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5514)) | |
- [Discover] Make table size adjustable according to table rows and columns ([#5514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5514)) |
close this since the issue is fixed |
Description
Auto-resized issue is caused by we have a central discover context created useSearch.
When it is updated, both panel and canvas which use useDiscoverContext will render.
The update on panel will trigger useSearch and cause canvas render before update is done.
Therefore when table might not be fully re-rendered and just use the current table space.
It appears that the main challenge is ensuring that DiscoverTable fully re-renders when the rows changes.
_source
takes multiple lines so we will see extra empty space at the bottom when we add a column. Since add/remove column always update last one, by add last column name as a key, we won't see extra space by fully re-render.We could do more optimization after 2.12.
Issues Resolved
#5440
Screenshot
fix-multiline.mov
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration