Skip to content

[8.x] [Discover] Added context aware logic for logs view in discover to show Load More… (#211176)#214229

Merged
achyutjhunjhunwala merged 4 commits intoelastic:8.xfrom
achyutjhunjhunwala:backport/8.x/pr-211176
Mar 13, 2025
Merged

[8.x] [Discover] Added context aware logic for logs view in discover to show Load More… (#211176)#214229
achyutjhunjhunwala merged 4 commits intoelastic:8.xfrom
achyutjhunjhunwala:backport/8.x/pr-211176

Conversation

@achyutjhunjhunwala
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…w Load More… (elastic#211176)

## Summary

Closes - elastic#166679

## What's included ?

- The PR adds a feature in Logs View of Observability (to start with) to
hide the regular pagination toolbar from the footer and show Load More
only when the user has scrolled to the bottom of the page.
- The table would always load the items in batches of default set 500
- This PR also add 2 helper functions `useThrottleFn` and
`useDebounceFn`. Current React help library which KIbana uses called
-`react-use` does not have these and we cannot use Lodash variant of
these. We need such hooks which are React safe. Hence added these 2

## What's pending ?

- [x] Unit tests for the 2 new helper React hooks
- [x] Unit tests for data table footer component
- [x] Unit tests for Profile Resolution
- [x] Functional Serverless Tests
- [x] Functional Stateful Tests

![Feb-14-2025
15-25-18](https://github.com/user-attachments/assets/fa66de6e-b3bd-46b4-a0ed-e30c4209a695)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
(cherry picked from commit 591c5b7)

# Conflicts:
#	.github/CODEOWNERS
#	src/platform/packages/shared/kbn-unified-data-table/tsconfig.json
#	src/platform/plugins/shared/discover/public/application/main/components/layout/discover_documents.test.tsx
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 12, 2025

💔 Build Failed

Failed CI Steps

History

Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving manual backport

@achyutjhunjhunwala achyutjhunjhunwala merged commit 49db391 into elastic:8.x Mar 13, 2025
8 checks passed
@achyutjhunjhunwala achyutjhunjhunwala deleted the backport/8.x/pr-211176 branch March 13, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants