-
Notifications
You must be signed in to change notification settings - Fork 915
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][Data Explorer][Discover] Allow data grid to auto adjust size based on fetched data count #5191
Conversation
…sed on fetched data count * This PR adds a new rows state to the DiscoverCanvas component and updated it whenever the data$ observable emitted new row data. * The DiscoverTable component was then refactored to accept rows as a prop, making it dependent on the parent component to provide the correct set of data. This ensures that the table renders correctly based on the current data and doesn't rely on its internal state, which could be outdated. Issue Resolve opensearch-project#5181 Signed-off-by: ananzh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #5191 +/- ##
==========================================
- Coverage 66.76% 66.75% -0.01%
==========================================
Files 3278 3278
Lines 62999 62999
Branches 10031 10031
==========================================
- Hits 42059 42056 -3
- Misses 18473 18475 +2
- Partials 2467 2468 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Nice! i was a little worried about how we might fix this because of how datagrid tends to spinout into an rerendering mess. Great job with the fix
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-5191-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 677fdf53052c6e116e5daf0cad98d73345116517
# Push it to GitHub
git push --set-upstream origin backport/backport-5191-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x Then, create a pull request where the |
…sed on fetched data count (opensearch-project#5191) * This PR adds a new rows state to the DiscoverCanvas component and updated it whenever the data$ observable emitted new row data. * The DiscoverTable component was then refactored to accept rows as a prop, making it dependent on the parent component to provide the correct set of data. This ensures that the table renders correctly based on the current data and doesn't rely on its internal state, which could be outdated. Issue Resolve opensearch-project#5181 Signed-off-by: ananzh <[email protected]> (cherry picked from commit 677fdf5) Signed-off-by: Miki <[email protected]>
* [BUG][Discover] Add onQuerySubmit to top nav and allow force update to embeddable (#5160) * all reload to force update embeddable * add onQuerySubmit to top nav Issue Resolve #5116 #5159 Signed-off-by: ananzh <[email protected]> Co-authored-by: Miki <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]> (cherry picked from commit 7d89cca) Signed-off-by: Miki <[email protected]> * [Discover] A bunch of navigation fixes (#5168) * Discover: Fixes state persistence after nav * Fixed breadcrumbs and navigation * fixes mobile view --------- Signed-off-by: Ashwin P Chandran <[email protected]> (cherry picked from commit cb6e0f0) Signed-off-by: Miki <[email protected]> * [BUG][Data Explorer][Discover] Automatically load solo added default index pattern (#5171) * [BUG][Data Explorer][Discover] Automatically load solo added default index pattern This fix ensures that when add a default index pattern, Discover will automatically select and load its details. Issue Resolve #5128 --------- Signed-off-by: ananzh <[email protected]> (cherry picked from commit 9601c6c) Signed-off-by: Miki <[email protected]> * [BUG][Data Explorer][Discover] Allow data grid to auto adjust size based on fetched data count (#5191) * This PR adds a new rows state to the DiscoverCanvas component and updated it whenever the data$ observable emitted new row data. * The DiscoverTable component was then refactored to accept rows as a prop, making it dependent on the parent component to provide the correct set of data. This ensures that the table renders correctly based on the current data and doesn't rely on its internal state, which could be outdated. Issue Resolve #5181 Signed-off-by: ananzh <[email protected]> (cherry picked from commit 677fdf5) Signed-off-by: Miki <[email protected]> * Fixes mobile layout (#5195) Signed-off-by: Ashwin P Chandran <[email protected]> (cherry picked from commit 0ffd2ab) * [BUG][Data Explorer][Discover] Allow filter and query persist when refresh page or paste url to a new tab (#5206) Issue Resolve #5179 #5071 Signed-off-by: ananzh <[email protected]> (cherry picked from commit 5623cef) Signed-off-by: Miki <[email protected]> * fixes DataTable rendering in doscover (#5207) Signed-off-by: Ashwin P Chandran <[email protected]> (cherry picked from commit c70125f) --------- Signed-off-by: ananzh <[email protected]> Signed-off-by: Miki <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]>
…sed on fetched data count (opensearch-project#5191) * This PR adds a new rows state to the DiscoverCanvas component and updated it whenever the data$ observable emitted new row data. * The DiscoverTable component was then refactored to accept rows as a prop, making it dependent on the parent component to provide the correct set of data. This ensures that the table renders correctly based on the current data and doesn't rely on its internal state, which could be outdated. Issue Resolve opensearch-project#5181 Signed-off-by: ananzh <[email protected]> Signed-off-by: Willie Hung <[email protected]>
…sed on fetched data count (opensearch-project#5191) * This PR adds a new rows state to the DiscoverCanvas component and updated it whenever the data$ observable emitted new row data. * The DiscoverTable component was then refactored to accept rows as a prop, making it dependent on the parent component to provide the correct set of data. This ensures that the table renders correctly based on the current data and doesn't rely on its internal state, which could be outdated. Issue Resolve opensearch-project#5181 Signed-off-by: ananzh <[email protected]>
Description
Issues Resolved
closes #5181
Screenshot
fix-5181.mov
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr