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

NHT: Link to an individual stat #341

Open
josh-bitovi opened this issue Jun 24, 2019 · 4 comments
Open

NHT: Link to an individual stat #341

josh-bitovi opened this issue Jun 24, 2019 · 4 comments
Assignees
Labels

Comments

@josh-bitovi
Copy link

josh-bitovi commented Jun 24, 2019

Rationale

For highlights (in emails), as well as future features (e.g. allowing admins to approve user-suggested stats), as well as encouraging users to share and create their own stats... we'd like to be able to link to a specific stat.

Implementation/design questions

@justinbmeyer do these requirements sound okay to you?

  • Linking to a stat will seek the video to the right spot
  • Video will loop for easy rewatching
  • Video will not autoplay

Relevant YouTube API docs

YouTube supports start, end, and loop parameters.

@tehfedaykin
Copy link
Contributor

Duplicate of #333

@tehfedaykin tehfedaykin marked this as a duplicate of #333 Jun 24, 2019
@rlmcneary2 rlmcneary2 changed the title Link to an individual stat NHT: Link to an individual stat Jun 25, 2019
@josh-bitovi
Copy link
Author

I can't self-assign, but I'll work on this one.

@josh-bitovi josh-bitovi added the p1 label Jun 26, 2019
josh-bitovi added a commit that referenced this issue Jun 27, 2019
See the comments here[0] for more info on the current state of debugging
this.

[0] #341
@josh-bitovi
Copy link
Author

branch: 341/deep-link-stat
commit: 0fbb341

Potential can-route-pushstate bug

Context

  1. Made a route for /games/{gameId}/{statId}
  2. Route appears to work (in that I get the statId passed in), but immediately redirects to /games/{gameId} (route order does not matter).

Steps taken to debug so far

  1. Tried logging the changes, that shows:

Screen Shot 2019-06-27 at 9 14 12 AM

  1. Cleared and reinstalled node_modules/ (in both the project root and public/)
  2. Restarted donejs develop
  3. Added in logStack
    (on statId changes) and can.queues.log('flush') (in general). The logStack call shows:

Screen Shot 2019-06-27 at 9 14 12 AM

Next steps

@justinbmeyer mentions parentTask: null should not be the case for changes managed by CanJS (though may be the case if you change things out-of-band). More investigation is needed. @justinbmeyer can you help w/this? I'll either pair w/you or pick up the next task.

CanJS DevTools

Was trying to use it to debug the above issue. It was detecting CanJS on the page (button in the upper-right), but not showing any components in the DevTools. I cannot reproduce this issue this morning.

@josh-bitovi
Copy link
Author

josh-bitovi commented Jun 27, 2019

Update:

  • The issue was fixed by changing statId: value.to(this, "statId"), to statId: value.bind(this, "statId"), (issue: binding the value in the URL to the undefined value in the game details VM... rather than going from the URL to the VM, or two-way binding)
  • The debugging curiosity was caused by new Component not registering as something that changes values (and as such not showing up in the logStack trace @justinbmeyer is making an issue for this.

Screen Shot 2019-06-27 at 11 13 49 AM

Thanks @justinbmeyer for your help in debugging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants