chore(*): ux improvements on advanced search when fetching files is taking longer#100
Open
igdmdimitrov wants to merge 6 commits into
Open
chore(*): ux improvements on advanced search when fetching files is taking longer#100igdmdimitrov wants to merge 6 commits into
igdmdimitrov wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the perceived responsiveness of the SearchAdvanced component when loading a large, manifest-based search index by introducing a two-phase loading strategy and a dedicated pending UI state.
Changes:
- Implement two-phase index fetching for “All packages” (latest-version files first, then remaining files in the background with periodic UI refresh).
- Add a pending/disabled UI state with a centered “Searching…” overlay during background loading.
- Document the two-phase behavior in the playground page.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| src/components/SearchAdvanced/SearchAdvanced.astro | Adds two-phase index loading, incremental UI refresh interval, and pending-state wiring. |
| src/components/SearchAdvanced/SearchAdvanced.scss | Styles the pending overlay and disables/greys out interactions while pending. |
| playground/src/pages/components/search-advanced.astro | Adds documentation explaining the two-phase loading behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+650
to
+653
| const useLatestFirst = | ||
| this.scope === 'all' && | ||
| this.latestPagesPromise !== null && | ||
| !this.allIndexLoadingComplete; |
Comment on lines
+1136
to
+1141
| for (const file of files) { | ||
| const slash = file.indexOf('/'); | ||
| if (slash < 0) continue; | ||
| const pkg = file.slice(0, slash); | ||
| const version = file.slice(slash + 1).replace(/\.json$/, ''); | ||
| const existing = best.get(pkg); |
Comment on lines
+704
to
+708
| this.renderResults(); | ||
| if (complete) this.clearUpdateInterval(); | ||
| }, 1000); | ||
| this.dialog.addEventListener('igcClosed', () => this.clearUpdateInterval(), { once: true }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.