Skip to content
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

improvement: Optimizing the experience of the app list page #3885

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

majian159
Copy link
Contributor

@majian159 majian159 commented Apr 26, 2024

feat: persist the query parameters of the App list page into the URL
fix: issue of infinite scrolling making redundant requests when there are no more data

Description

  1. Currently, when searching and filtering the list of apps, these states are lost upon page refresh, making it difficult to share the list page with specific people. This pull request persists the query parameters in the URL for easier sharing.
  2. The current implementation of useSWRInfinite does not check for hasMore, causing all list page queries to be requested twice. This pull request adds this check to stop the second request when there are no more data available.

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • TODO

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

fix: issue of infinite scrolling making redundant requests when there are no more data
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 26, 2024
@majian159 majian159 changed the title feat: persist the query parameters of the App list page into the URL feat: persist the query parameters of the App list page into the URL and fix: issue of infinite scrolling making redundant requests when there are no more data Apr 26, 2024
@dosubot dosubot bot added the ☕️ typescript Pull request that update TypeScript code. label Apr 26, 2024
@majian159 majian159 changed the title feat: persist the query parameters of the App list page into the URL and fix: issue of infinite scrolling making redundant requests when there are no more data improvement: Optimizing the experience of the app list page Apr 26, 2024
@zxhlyh zxhlyh requested a review from JzoNgKVO April 26, 2024 08:53
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 28, 2024
@JzoNgKVO JzoNgKVO merged commit 9d1cb1b into langgenius:main Apr 28, 2024
7 checks passed
@majian159 majian159 deleted the feat/apps-url-query-state branch April 28, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants