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

Issue-152: Debounce search-as-you-type in post selector #500

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mogmarsh
Copy link
Contributor

@mogmarsh mogmarsh commented Dec 7, 2023


name: Debounce search-as-you-type in post selector
about: Improve the search performance in the post selector by debouncing search requests
title: 'Debounce search-as-you-type in post selector'
labels: enhancement
assignees: ''
issue_number: 152


Problem
In the post selector, searches happen immediately (after the 3rd character), which can cause many unnecessary requests. The search REST API endpoint can be quite slow if there's a lot of content on the site, so this could end up being a significant issue. It would be great to debounce this so the search doesn't happen until the user stops typing for 2-3 seconds.

Proposed solution
Implement a debounce function to delay the search request by 2-3 seconds after the user stops typing. This will help reduce the number of unnecessary requests and improve the overall performance of the post selector.

Additional context
Debounce in action (GIF)

Related issue
#152

Copy link

changeset-bot bot commented Dec 7, 2023

⚠️ No Changeset found

Latest commit: bd9af41

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Dec 7, 2023

Important

Auto Review Skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant