-
Notifications
You must be signed in to change notification settings - Fork 121
Add functionality to share single map plays #53
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution! I will review this soon and push if it seems safe. This is a feature I wanted to implement as well but didn't have time. |
|
Whenever you may get to this, I saw a bug in the #bug-reports channel on the discord about being able to move during nomove modes, and made a commit to fix that as well. Here's a link to that thread on discord below https://discord.com/channels/1229957469116301412/1345341180614803497 |
|
Problem with that approach is it will break the chat when people type those keys |
|
Sorry about how this hasnt been merged for so long, in the middle of AP season and need to grind. Will try to get it to this asap! |
|
Its all good! Priorities are important and this should still be here whenever you get to it (so long as it doesnt get stale compared to the master branch!) |
|
I also got a bit more time to test and found that typing into the chatbox was actually fine with the eventListener approach to stop keydown on the streetview component. Or at least in my testing. I enabled the chatbox manually and had two instances open to make sure both instances (firefox and chrome) could still type S and W into the chat while not being able to use those keys to move in the streetview embed. If you dont want this approach, its still understandable, but if you'd like to even just take just those changes and apply them to master separate from this PR, thats fair! |
|
That is interesting, could you make a new PR with just that change? That is actually a lot more high priority so would merge faster if it works out. |
|
Heres the other PR #56 |
The idea of this is to be able to share a single round play from a place you know.
Take a google maps streetview link, put it into this new modal, and then it will create a sharable link with the settings of the users choosing. Navigating to the link will take any user to a single play of that exact streeview place, with the selected settings.
I personally just wanted this feature, and figured i could just contribute it myself :)
Changes made:
created files
gameSettingsOptions.js(to use the checkboxes in sharing modal),singleShareModal.js(previously said sharing modal).New text is all in the common.js, and every different localization use the Cambridge Translator
Most logic is in home.js, in which it uses the router to interpret a new
?single-''param in the sharable link to parse into the three selected settings and coords from the streeview link. Going back from this single-singleplayer screen clears the param and just goes back to/(Also, a lot of the diff on home.js is formatting)Inside the share modal, the sharable URL is created just by changing each digit in the coordinate from the google maps link to its character integer, because I wanted it to not be very readable if a user knew how to find a location using the coordinate system.