Closed joshwilsonvu closed 2 years ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
hexapipes | ✅ Ready (Inspect) | Visit Preview | Aug 6, 2022 at 6:29PM (UTC) |
Thanks for the PR =).
Navigating to another puzzle size is done client-side, so maybe it doesn't count as leaving the page for the purposes of this event. You could maybe dispatch a pause
event from the Puzzle's onDestroy hook and handle it in the PuzzleWrapper
.
I'll review and try this out after I'm done with revamping controls.
Thanks for the idea, I'm a bit new to Svelte. Made the change and I think that took care of any logic issues, should be ready to go.
Thanks again, the changes should be live now.
There was a small problem where puzzles started before this change would show "Paused" instead of a timer when you open them because their pausedAt
was undefined
. But I think I fixed it).
I mentioned you in the changelog (an obscure place, I know). If you have suggestions for how I should do contributor acknowledgements then please let me know)).
Yep, I saw the fixes you made, looked good. I'm happy with the changelog acknowledgement, and thanks for taking the time to review and merge the PR!
Resolves #35. Regarding the last comment, I believe
visibilitychange
covers every relevant case:I got pausing timers working in Safari and Chrome. I noticed a small thing, not a blocker—when you're working on a puzzle of one size and click a link to load a puzzle of a new size, the current puzzle won't be paused, I'm confused why. After that though, the back and forward buttons pause and unpause the puzzles correctly. But for every other case I tested, it worked like a charm!
Please let me know if it would be helpful to make any changes. Thanks!