Skip to content

[Bug] - Blinking of arrow to select a language on language select #241

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

Closed
ACR1209 opened this issue Jan 21, 2025 · 2 comments · Fixed by #245
Closed

[Bug] - Blinking of arrow to select a language on language select #241

ACR1209 opened this issue Jan 21, 2025 · 2 comments · Fixed by #245
Labels
bug Something isn't working

Comments

@ACR1209
Copy link
Contributor

ACR1209 commented Jan 21, 2025

What bug did you find in the codebase?

The select a category arrow is sometimes shown briefly when selecting a different language.

2025-01-21.15-36-36.mp4

This is caused by the following code and an incomplete checking of the loading state causing a race condition

  if (!fetchedSnippets)
    return (
      <div>
        <LeftAngleArrowIcon />
      </div>
    );

This can be simply fixed by taking into consideration the snippets loading state and putting a spinner on it. I can work on solving it this way if no one opposes😄

@ACR1209 ACR1209 added the bug Something isn't working label Jan 21, 2025
@technoph1le
Copy link
Owner

Hey, there! Yeah, it was a quick solution for loading state xD. Will free to open a pr and work on it.

@ACR1209
Copy link
Contributor Author

ACR1209 commented Jan 25, 2025

Hey, there! Yeah, it was a quick solution for loading state xD. Will free to open a pr and work on it.

Yes it happens, who knows how many times I've done the same hahaha

Already done, I did not put a spinner as it still did the blinking although it might be needed to add it if some time on the future there are too many snippets to quickly load them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants