Reset button#884
Merged
outoftime merged 1 commit intopopcodeorg:masterfrom Jun 25, 2017
Merged
Conversation
outoftime
reviewed
Jun 25, 2017
| z-index: 1; | ||
| } | ||
|
|
||
| .preview__pop-out-button { |
Contributor
There was a problem hiding this comment.
So I think it makes sense for this and preview__reset-button to be modifiers for preview__button—e.g. this would be preview__button_pop-out and the other would be preview__button_reset—WDYT?
Contributor
Author
There was a problem hiding this comment.
Yes! That looks great
Contributor
Author
|
@outoftime This should be ready! Once you've reviewed it, my plan is to squash all these commits into one duet commit that says: Add a reset button to the popcode preview pane to allow students to reset the state of their code. How's that sound? |
outoftime
approved these changes
Jun 25, 2017
…eset the state of their code. Signed-off-by: Kaylee Knowles <kayleeknowles42@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the cleaned up version of this branch: #862 and is a pairing collaboration between @kaylee42 and I.
The feature adds a refresh button to the preview pane that resets the state of the code to before the js has run. It looks like this:

Often while in the classroom, I saw students either confused as to how to play an animation over that was js based. They would either open the popout window or applying a roundabout way like adding extra spaces to their code and then deleting them to get popcode to re-render.
This feature is meant to add that functionality without having the students editing their code. It uses a timestamp of the last time the refresh button was clicked and inserts that into a comment in the preview pane html to force React to re-render.
Closes #862