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

Allow the language selector to detect autonym by exonym #883

Merged
merged 8 commits into from Mar 5, 2024

Conversation

chukarave
Copy link
Contributor

@chukarave chukarave commented Feb 19, 2024

This PR adds the ability to search for a language name in any language and have the autonym suggested (same behavior as Wikidata).

Bug: T353727

@chukarave chukarave marked this pull request as ready for review February 26, 2024 07:42
Copy link
Collaborator

@hasanakg hasanakg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works great! One exception: I think we need to have a debounce period for API searches, right now we send an API call immediately after key down, but we need to call the API if the user doesn't write for some period like 300ms.

@chukarave
Copy link
Contributor Author

@hasanakg this is a great point, I added debouncing (naming advice welcomed) but to avoid displaying the "Language not available" message often while the input is still being typed in I set it to 200ms. what do you think?

Copy link
Collaborator

@hasanakg hasanakg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to solve the empty input problem that I mentioned in the code comments.

resources/js/Components/LanguageSelector.vue Show resolved Hide resolved
resources/js/Components/LanguageSelector.vue Show resolved Hide resolved
hasanakg
hasanakg previously approved these changes Feb 26, 2024
@guergana
Copy link
Contributor

guergana commented Feb 26, 2024

@chukarave as much as I would have liked to come up with the solution for the svg-jest mock transformer by myself, i actually found it in this github issue thread, in case you wanna take a look: jpkleemans/vite-svg-loader#35 (comment)

@chukarave
Copy link
Contributor Author

@guergana nice! thanks. it's pretty straight forward, I like that it doesn't require installing any svg tansformer packages.

@chukarave chukarave marked this pull request as draft February 27, 2024 13:11
@chukarave chukarave marked this pull request as ready for review February 28, 2024 12:01
@chukarave chukarave merged commit dc16ab6 into development Mar 5, 2024
5 checks passed
@chukarave chukarave deleted the language-detection branch March 5, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants