Skip to content

Reset button#884

Merged
outoftime merged 1 commit intopopcodeorg:masterfrom
ibrand:reset_button
Jun 25, 2017
Merged

Reset button#884
outoftime merged 1 commit intopopcodeorg:masterfrom
ibrand:reset_button

Conversation

@ibrand
Copy link
Copy Markdown
Contributor

@ibrand ibrand commented Jun 25, 2017

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:
refreshbutton

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

Comment thread src/css/application.css Outdated
z-index: 1;
}

.preview__pop-out-button {
Copy link
Copy Markdown
Contributor

@outoftime outoftime Jun 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! That looks great

@ibrand
Copy link
Copy Markdown
Contributor Author

ibrand commented Jun 25, 2017

@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?

…eset the state of their code.

Signed-off-by: Kaylee Knowles <kayleeknowles42@gmail.com>
@popcodeorg popcodeorg deleted a comment from ibrand Jun 25, 2017
@outoftime outoftime merged commit 32aa9c7 into popcodeorg:master Jun 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants