Fixes #26305: Implement progressive infinite scroll for Explore dropdowns#27747
Fixes #26305: Implement progressive infinite scroll for Explore dropdowns#27747mohitjeswani01 wants to merge 2 commits intoopen-metadata:mainfrom
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi @harshach Sir Could you please add the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review 👍 Approved with suggestions 3 resolved / 4 findingsImplement progressive infinite scroll for Explore dropdowns, resolving race conditions and unnecessary API calls. Address potential cross-dropdown state interference to ensure independent pagination across fields. 💡 Bug: Shared pagination state may cause cross-dropdown interference📄 openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreQuickFilters.tsx:53-64 📄 openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreQuickFilters.tsx:267-275
In practice this is partially mitigated because Suggested fix✅ 3 resolved✅ Bug:
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
|
@gitar-bot isLoadingMoreRef is a ref, not state — it updates synchronously, so even if a user rapidly switches dropdowns, the guard is immediately cleared for the new dropdown. AntD with destroyPopupOnHide destroys the previous popup DOM, so the old scroll container and its event listeners are torn down before the new one mounts. Moving to per-field Record<string, { isLoadingMore, hasMore }> would add complexity without solving a real user-facing issue. Happy to revisit if testing reveals an actual race, but the current synchronous reset approach is safe for this use case. |
Describe your changes:
Fixes #26305
I worked on implementing a progressive infinite scroll mechanism for Explore page quick filters (Tags, Owners) because loading 15,000+ aggregation buckets simultaneously caused severe browser hangs and DOM rendering bottlenecks.
What changes did I make?
termsaggregations do not natively support offset/cursor-based pagination (from/after), I implemented a progressive size increment strategy (fetchingsize=50, thensize=100, etc.) to simulate infinite scrolling.isPaginatedboolean prop toSearchDropdown(defaulting tofalse) to ensure we don't break backward compatibility with Domain, Glossary, and Lineage page usages.dropdownRendermenu in a scrollabledivwith a pure ReactonScrolllistener, completely avoiding fragiledocument.querySelectorDOM manipulations.How did I test my changes?
SearchDropdown.test.tsxverifying scroll threshold mathematics,isLoadingMoreguards, and UI state changes.ExploreQuickFilters.spec.tsthat intercepts the/search/aggregatenetwork request to explicitly verify thatsize=50andsize=100payloads are requested sequentially upon scrolling.(Note: As my local environment is resource-constrained, UI screenshots are omitted, but functionality is strictly verified via the attached Playwright CI tests).

Type of change:
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes #26305: Implement progressive infinite scroll for Explore dropdownsI have commented on my code, particularly in hard-to-understand areas.
I have added tests around the new logic.
🚀 A Personal Note: WeMakeDevs × OpenMetadata Hackathon Wrap-up
This PR marks my final contribution for the WeMakeDevs hackathon. Pushing 24 PRs over the last two weeks—ranging from AI Root Cause Analysis engines to Core DB Reliability and Frontend optimizations—has been an incredible engineering gauntlet. I deeply appreciate the maintainers (@harshach, @ulixius9, @Rohit0301 and complete collate team) for their rigorous reviews and high standards. The hackathon may be ending, but I will definitely be sticking around the OpenMetadata community. Looking forward to what we build next!