Skip to content

Species autocomplete#7

Open
svenddpc wants to merge 11 commits into
SimonCarryer:masterfrom
svenddpc:species_autocomplete
Open

Species autocomplete#7
svenddpc wants to merge 11 commits into
SimonCarryer:masterfrom
svenddpc:species_autocomplete

Conversation

@svenddpc

Copy link
Copy Markdown
Contributor

OK, this is working. Not sure if it's nice enough? I would rather the autocomplete dropdown was "on top of the page" instead of inserted into it...

What do you think?

I think I might have broken the "base birdnerd" site with these changes, so at least it's not quite ready to merge in yet :)

svenddpc and others added 10 commits April 20, 2022 10:30
This fixes an issue where an answer is rated as wrong if it has whitespace on either end.
This happens when entering words on a mobile using auto-complete.
…me. Use the return type constants properly instead of a mix of bools and InvalidAnswer.
Because got_it_right is now an int and "correct" is 0, but got_it_right was being evaluated as a bool, 0 would evaluate to false. Now it's correctly comparing to constant value.
This makes them sorted automatically when they appear in the auto complete.
Added autocomplete functionality as described on w3schools here: https://www.w3schools.com/howto/howto_js_autocomplete.asp
Fixed some html issues (proper structure in index.html as well as some IDs that had spaces in them).
@svenddpc

Copy link
Copy Markdown
Contributor Author

Note, these changes include the changes in the other PR (not allowing species not on the list).

I had accidentally done some of the changes (for the "don't accept invalid species") in the base /scripts/ folder.
This commit reverts some of those, but also adds some changes/fixes to the index.html
@svenddpc svenddpc marked this pull request as ready for review June 10, 2022 01:51
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