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

Add word definition link on hover and on game end #57

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

Conversation

JohnHKoh
Copy link

Show word definition on row hover for locked in words and for the final target word at the end of the game.

No hover:
image

On hover:
image

Clicking on the magnifying glass opens https://www.collinsdictionary.com/dictionary/english/{word}. The positioning of the magnifying glass is set dynamically by using a ref for the last letter of every row and using its offsetLeft and offsetWidth to position the icon absolutely from there.

For the game ending, hovering over the target word underlines the word and allows you to open the dictionary link that way.

image

Tested on Chrome and iOS Safari.

Addresses feature request #19 .

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