-
Notifications
You must be signed in to change notification settings - Fork 917
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 row rendering in infinite scroll #8060
Fix row rendering in infinite scroll #8060
Conversation
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
ℹ️ Manual Changeset Creation ReminderPlease ensure manual commit for changeset file 8060.yml under folder changelogs/fragments to complete this PR. If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link. For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8060 +/- ##
==========================================
+ Coverage 63.71% 63.83% +0.12%
==========================================
Files 3738 3738
Lines 88682 88684 +2
Branches 13788 13789 +1
==========================================
+ Hits 56501 56614 +113
+ Misses 31593 31476 -117
- Partials 588 594 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
...ins/discover/public/application/components/default_discover_table/default_discover_table.tsx
Outdated
Show resolved
Hide resolved
...ins/discover/public/application/components/default_discover_table/default_discover_table.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
❌ Invalid Prefix For Manual Changeset CreationInvalid description prefix. Found "fix". Only "skip" entry option is permitted for manual commit of changeset files. If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description. |
Signed-off-by: Simeon Widdis <[email protected]>
...ins/discover/public/application/components/default_discover_table/default_discover_table.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
<EuiProgress | ||
size="xs" | ||
color="accent" | ||
data-test-subj="discoverRenderedRowsProgress" | ||
style={{ | ||
// Add a little margin if we aren't rendering the truncation callout below, to make | ||
// the progress bar render better when it's not present | ||
marginBottom: rows.length !== sampleSize ? '5px' : '0', | ||
}} | ||
/> |
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.
Why arent we adding the truncation banner for PPL and SQL?
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.
That would require being able to get the active selected language in-context since PPL and SQL have a different default number of records they return when they have no limit configured, I briefly tried to follow the stack trace to see if I could pass that context down but couldn't find where it exists. Figured fixing the core bug was more important than the bells & whistles for this PR, could look at it for a future PR.
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.
Thanks Simeon!
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.
LGTM, I reran the build and test workflow that failed. I don't think it's related to your changes, but will wait for that before merging first.
Signed-off-by: Simeon Widdis <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit fbac07b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Simeon Widdis <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit fbac07b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit fbac07b) Signed-off-by: Simeon Widdis <[email protected]> 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> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit fbac07b) Signed-off-by: Simeon Widdis <[email protected]> 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> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
When rendering infinite scrolling PPL/SQL in the new Discover UI, the rendering was stalling and entering an infinite loading loop. The root cause turns out to be that there's a small amount of fade-out at the bottom of the OSD application:
This was causing an issue with the progress bar observer responsible for loading the next batch of rows: it had
threshold: 1.0
set which meant that it would only trigger if the progress bar is 100% visible. This isn't a problem for DQL where large amounts of data records have a limit disclaimer at the bottom:But when that disclaimer isn't present (for PPL and SQL), this fade effect would cover the progress bar, causing it not to meet the
1.0
threshold:In addition to fixing the bug, this PR adds a batch of unit tests for the discover table.
Issues Resolved
N/A
Screenshot
After reaching the end of the available records:
Testing the changes
The PR features a new set of unit tests for the involved functionality, but given the nature of the bug it's hard to test the fault directly (we would need to mock the entire OSD application and assert that the intersection threshold is > 0.5 when we scroll to the end). Theoretically possible, but probably too much effort for a one-line fix.
Changelog
Check List
yarn test:jest
yarn test:jest_integration