-
Notifications
You must be signed in to change notification settings - Fork 918
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
Fix: Update button position when number of rows per page is large #3797
Fix: Update button position when number of rows per page is large #3797
Conversation
Signed-off-by: Sirazh Gabdullin <[email protected]>
@curq Added comment here Let me know if you want to combine the bug fixes into one PR. I am okay with one or two PRs. If you prefer two PRs, I could approve this one. You just need to update CHANGELOG. Once this PR #3397 is merged, I might open an issue and assign you to update unit test. |
Signed-off-by: Sirazh Gabdullin <[email protected]>
Signed-off-by: Sirazh Gabdullin <[email protected]>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #3797 +/- ##
==========================================
- Coverage 66.37% 66.36% -0.01%
==========================================
Files 3209 3209
Lines 61732 61732
Branches 9533 9533
==========================================
- Hits 40974 40970 -4
- Misses 18466 18469 +3
- Partials 2292 2293 +1
Flags with carried forward coverage won't be shown. Click here to find out more. see 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@curq Thanks for the fix!
This strikes me as not ideal. Do you mind opening an issue in OUI where we can discuss whether this behavior is actually desired or useful? |
@joshuarrrr as you requested, I opened a new issue in OUI repo where I have provided a more detailed description of the behavior, along with examples. |
all checks passed, but I need to resolve a changelog conflict |
data source manager cypress test failures are safe to ignore. |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-3797-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 01c5a92858f531c87aa5508ed991c63f4e3af5f7
# Push it to GitHub
git push --set-upstream origin backport/backport-3797-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
…ensearch-project#3797) * Fix: Update button position when number of rows per page is large * Update CHANGELOG.md Signed-off-by: Sirazh Gabdullin <[email protected]> --------- Signed-off-by: Sirazh Gabdullin <[email protected]> Co-authored-by: Josh Romero <[email protected]> (cherry picked from commit 01c5a92)
No need to backport - incorporated into #3397 |
…ensearch-project#3797) * Fix: Update button position when number of rows per page is large * Update CHANGELOG.md Signed-off-by: Sirazh Gabdullin <[email protected]> --------- Signed-off-by: Sirazh Gabdullin <[email protected]> Co-authored-by: Josh Romero <[email protected]> Signed-off-by: David Sinclair <[email protected]>
Description
After the fix the table component no longer renders unused space for extra rows. Before the fix when the option max rows per page was larger than actual number of results, the table component was rendered with height that could fit max number of rows per page and not the actual number. Screenshot from the issue #3756:
The number of results in this screen is 50, while the max number of rows per page is 100. As the result, half of the table component is empty and the update button is pushed far below. I have checked the component from the docs in the sandbox and this is expected behavior.
Therefore, to prevent this bug I assumed that we need to ensure that max number of rows is never larger than number of rows in resulting table. This fix does exactly that. The same case (50 resulting rows, 100 max number of rows),
The fix is achieved by updating
usePagination
hook.Issues Resolved
Fixes #3756
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr