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

Share button like Wordle has #11

Closed
petzku opened this issue Jan 25, 2022 · 6 comments
Closed

Share button like Wordle has #11

petzku opened this issue Jan 25, 2022 · 6 comments

Comments

@petzku
Copy link

petzku commented Jan 25, 2022

Wordle has a "share" button on the win screen, which allows one to share their result as a set of emoji without revealing the word or their guesses (the asterisk indicates "hard mode", other parts should be self-explanatory):

Wordle 220 3/6*

⬜⬜🟩🟨⬜
⬜🟩🟩⬜⬜
🟩🟩🟩🟩🟩

I've written a javascript bookmarklet to do this, but it would be nice to have this as a "proper" feature.

@Cadiac
Copy link
Owner

Cadiac commented Jan 25, 2022

This is coming soon, the rough implementation is already at beta.sanuli.fi but I need some proper place for the button & a toast message to let the user know that the input was copied to their clipboard.

And perhaps polyfill browsers without navigator.clipboard features, but that is annoying to do at non-js world

@petzku
Copy link
Author

petzku commented Jan 25, 2022

Love to hear it!

And perhaps polyfill browsers without navigator.clipboard features, but that is annoying to do at non-js world

ah, the perils of web design: always constrained by backwards compatibility

@petzku
Copy link
Author

petzku commented Jan 25, 2022

Ah, went to try it just now, and you might have an off-by-one error (today's is 19). I agree that the button is not really in a good place now, also you seem to insert newlines for all unguessed rows too?

Sanuli #18 3/6

⬛🟩⬛🟩⬛
⬛🟩⬛🟩🟩
🟩🟩🟩🟩🟩




@Cadiac
Copy link
Owner

Cadiac commented Jan 25, 2022

The deployed version indeed has the off-by-one error and the newlines, both fixed at local dev branch :) Thanks for pointing that out though! And the button placement was just an easy placeholder, as I needed to test the clipboard there (since it can't be used in non-HTTPS context)

I'm also planning another sharing feature: a way to generate a link to share any completed game, not just the daily word, which would open the game without the characters shown, and the user who clicked could either reveal them, or try to solve the same word from the beginning.

This is something that the refactoring I've done last week would allow without resetting the current streaks the user might have at sanuliketju/classic mode

@Cadiac
Copy link
Owner

Cadiac commented Jan 26, 2022

A simple version of this was deployed yesterday, clicking the link after päivän sanuli is solved copies the string on clipboard.

@Cadiac
Copy link
Owner

Cadiac commented Feb 3, 2022

The link sharing feature was now also added, closing this issue.

@Cadiac Cadiac closed this as completed Feb 3, 2022
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

No branches or pull requests

2 participants