-
Notifications
You must be signed in to change notification settings - Fork 9
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
Make new puzzle entry easier #237
Comments
Another light automation idea here: we could make the puzzle entry form start out with the URL input at the top, and when that input is changed, attempt a I imagine operators would still probably need to do some amount of trimming of excess content from autofilled titles, since I suspect they may wind up being like "Puzzle title -- Maybe round title -- Mystery Hunt 2018". |
I could see that working, although I will note that it could break flow for the operator a little bit, as basically while I'm entering a puzzle, I have to sit while I wait for JR to fetch and process the URL, during which time I can't do anything. I can see that coming up especially when there are multiple new puzzles released - today there aren't any delays from JR, just delays from me going back and forth between tabs and copy/pasting things. |
After poking at it briefly, I think CORS means my idea (doing the A bookmarklet might still be worth investigating. We could make it so that if your URL had a particular pattern in the fragment we auto-show the add puzzle modal and fill it with other values from the fragment, and then we just make the bookmarklet stuff the title & location in there? |
fwiw I did a bit of a naive implementation of this in jimsug/feature-guess-puzzle-name, where it tries to guess the puzzle title from the URL, but it assumes that the puzzle name will be sluggified in the last part of the URL path, which might not always be the case. No delay, though. |
FYI, I am working to put together a rough browser extension to allow adding a puzzle from the current page. It would infer the puzzle title and URL from the page itself. Not sure I'll be able to get the whole thing done in time for this year, though. Starting point is in #1948 which adds the needed server-side APIs. Remaining work is to expose the API key in a slightly friendlier way and then build a quick and dirty extension. |
I like it, and if it's ready and merged before Hunt then that would be amazing! I just didn't feel like writing My First Extension™ for this, though I guess you have to start somewhere. Did you have thoughts on what the best way to infer puzzle title? I haven't baked that into the bookmarklet logic, but perhaps that's something that can live in the app code. |
I've been assuming that the page title (in the We could start with some hardcoded heuristics. I could imagine either exposing editable rules in the extension options page, or making it a setting in the server-side configuration that the extension could then read from. |
That seems reasonable to me. For what it's worth, I was considering having a per-hunt configuration for both "URL pattern" and "Puzzle title", both being a regex-like expression. This would let us match URLs with a regular expression to determine whether it should be added as a puzzle, and if so, what parts if the puzzle should be added - maybe it could define placeholders for The puzzle title pattern could be used to extract the title of a puzzle, when that's passed as a parameter, and it would work with the current hash/bookmarklet thing I've got going as well. |
#2392 has an initial implementation of an extension. It should work as a standalone PR if patched in, though it includes a few other commits that are also available as separate pending PRs. Demo video here, if you want to see how it works: https://www.youtube.com/watch?v=kvUdRjqiar8 |
Instead of requiring operators to enter details about puzzles by hand, we should try to do something smarter. There are a few options:
The text was updated successfully, but these errors were encountered: