pcottle / learnGitBranching

An interactive git visualization and tutorial. Aspiring students of git can use this app to educate and challenge themselves towards mastery of git!
https://pcottle.github.io/learnGitBranching/
MIT License
30.34k stars 5.73k forks source link

#937 - Solution proposal #1072

Closed Netz00 closed 1 year ago

Netz00 commented 1 year ago

Waiting for comment, all tests passed. I will add tests for this feature after it's approval.

Before

After:

netlify[bot] commented 1 year ago

Deploy Preview for xenodochial-hugle-b9ec84 ready!

Name Link
Latest commit 7a55e66b376485ec51af4bbd18e38afb9062af24
Latest deploy log https://app.netlify.com/sites/xenodochial-hugle-b9ec84/deploys/645535c483f61b00082ba07f
Deploy Preview https://deploy-preview-1072--xenodochial-hugle-b9ec84.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

pcottle commented 1 year ago

Alright super close! This definitely resets the animation but I think it also prevents advancing to the next screen. When I tried it out using the green "right" arrow to advance through the lesson, I just got stuck in the loop of going to the reset button -> back to the original starting point, but I could never advance to the next part of the lesson.

I think this is because that positive method just puts us in a loop. I think we would need to do something like this:

onResetButtonClick: () => {
  this.demonstrated = false;
  this.takeControl();
}

and then just wire up the button click

Screenshot 2023-05-04 at 4 39 33 PM Screenshot 2023-05-04 at 4 39 24 PM
Netz00 commented 1 year ago

Yeah, sorry for that. I completely forgot to check itπŸ€¦πŸ»β€β™‚οΈ. Should be fixed with the last commit. I am glad the rest is okay, and I am not sure if I should add some tests.

pcottle commented 1 year ago

Looks great! Going to do two little polish things (change it to "Reset Animation" and maybe fade it out a bit) but thanks so much :D

pcottle commented 1 year ago
Screenshot 2023-05-05 at 4 06 03 PM