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

Fixes fancy-box.tsx bugs #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

AbrahamX3
Copy link

What does this PR fix?

  • Appending space bug removes create new button
  • Spamming search input freezes browser tab.

Notes and Research

The Freezing

Upon investigating the freezes, I tested with some debounce hooks to see if it fixes the issue, which It did. Testing with different delays it seems like it worked with the most minimal delay (0.1), In the code I am providing, I used a simple setTimeout with a delay of 0.1. The risk of a memory leak is very minimal, but I recommend a full-fledged debounce hook with a cleanup function if used in production. This stops the freezing, although it does get a bit laggy if you do end up spamming for quite a while.

The space bug

The code provided successfully identifies the spaces or whitespace and adds it to the render condition; it also trims out the value if you do have some whitespace, you're still able to add labels with a space and trims it upon creating a new label.

Demonstration

Testing spam freezes

chrome_3oHVmdHvep.mp4

Testing space bug

chrome_P305WgxSAy.mp4

Copy link

vercel bot commented Mar 6, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @mxkaske on Vercel.

@mxkaske first needs to authorize it.

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