Skip to content

Add reset progress option to user settings#10824

Merged
1 commit merged intofreeCodeCamp:stagingfrom
dhcodes:feature/add-progress-reset-option-in-settings
Oct 26, 2016
Merged

Add reset progress option to user settings#10824
1 commit merged intofreeCodeCamp:stagingfrom
dhcodes:feature/add-progress-reset-option-in-settings

Conversation

@dhcodes
Copy link
Copy Markdown
Contributor

@dhcodes dhcodes commented Sep 20, 2016

Pre-Submission Checklist

  • Your pull request targets the staging branch of FreeCodeCamp.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
  • You have only one commit (if not, squash them into one commit).
  • All new and existing tests pass the command npm run test-challenges. Use git commit --amend to amend any fixes.

Type of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Add new translation (feature adding new translations)

Checklist:

Description

Made a new jade page for progress reset, updated settings to add new button to reset progress, wrote functions to reset necessary attributes for user and update progressTimestamp to when the progress is reset. I tested this locally by making a new user, checking the mongo record, completing a few challenges, resetting the progress, and then confirming that the reset record matched the original new record.

@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Sep 20, 2016

Will update this based on the Travis build fail

Update: hooray, Travis and I are friends again.

@camperbot
Copy link
Copy Markdown
Contributor

@dhcodes updated the pull request.

@dhcodes dhcodes force-pushed the feature/add-progress-reset-option-in-settings branch 2 times, most recently from 6525422 to afb985b Compare September 20, 2016 18:23
@camperbot
Copy link
Copy Markdown
Contributor

@dhcodes updated the pull request.

@dhcodes dhcodes force-pushed the feature/add-progress-reset-option-in-settings branch from afb985b to 7d1a19a Compare September 20, 2016 19:36
@camperbot
Copy link
Copy Markdown
Contributor

@dhcodes updated the pull request.

1 similar comment
@camperbot
Copy link
Copy Markdown
Contributor

@dhcodes updated the pull request.

@dhcodes dhcodes force-pushed the feature/add-progress-reset-option-in-settings branch from 7d1a19a to d799f31 Compare September 20, 2016 19:43
@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Sep 20, 2016

As an aside, I'm not sure this removed the code stored in the editor from challenges I'd completed with my test user. Is #10200 implemented on staging?

Copy link
Copy Markdown
Member

@Bouncey Bouncey left a comment

Choose a reason for hiding this comment

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

I will pull down today and test locally

longestStreak: 0,
currentChallengeId: '',
isBackEndCert: false,
isFullStackCert: false,

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

p This will really delete all of your progress and brownie points.
p We won't be able to recover any of it for you later, even if you change your mind.
.modal-footer
a.btn.btn-success.btn-block(href='/about', data-dismiss='modal', aria-hidden='true')

This comment was marked as off-topic.

This comment was marked as off-topic.

.modal-dialog
.modal-content
.modal-header
a.close(href='/about', data-dismiss='modal', aria-hidden='true') ×

This comment was marked as off-topic.

This comment was marked as off-topic.

postResetProgress
);
api.get(
'/account',

This comment was marked as off-topic.

longestStreak: 0,
currentChallengeId: '',
isBackEndCert: false,
isFullStackCert: false,

This comment was marked as off-topic.

@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Sep 25, 2016

I've updated this but can't get the changes to update on the PR. I think I'll have to make a new branch and try again :(

@dhcodes dhcodes force-pushed the feature/add-progress-reset-option-in-settings branch from d799f31 to e543693 Compare September 26, 2016 15:56
@camperbot
Copy link
Copy Markdown
Contributor

@dhcodes updated the pull request.

@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Sep 26, 2016

@Bouncey @BerkeleyTrue I updated based on your feedback and re-tested locally. Should be better now.

@BerkeleyTrue
Copy link
Copy Markdown
Contributor

LGTM. Can someone test

@BerkeleyTrue BerkeleyTrue added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Oct 7, 2016
@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Oct 11, 2016

I think this should be good to go.

@ghost
Copy link
Copy Markdown

ghost commented Oct 15, 2016

Cannot QA. /settings automatically redirects to /map. Not sure of the cause, but I don't believe it's an issue with this PR.

cc/ @FreeCodeCamp/issue-moderators

@ivantedja
Copy link
Copy Markdown
Contributor

@atjonathan the redirection probably related with #10879

@ghost
Copy link
Copy Markdown

ghost commented Oct 15, 2016

@Bouncey, please rebase this off staging. The /settings route works on the staging branch 🎉

@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Oct 15, 2016

@atjonathan you should be able to get to the settings by clicking your avatar from the map page. Or something. Just keep clicking your avatar and it should get you there eventually. There's an open issue about the map redirect

@ghost
Copy link
Copy Markdown

ghost commented Oct 15, 2016

@dhcodes, couldn't get that to work on this PR. Works fine on staging.

@ivantedja
Copy link
Copy Markdown
Contributor

@atjonathan I don't see any different behaviour between this PR and staging

  • from /map
  • click avatar and it will go to settings

I did reinstall everything though (node_modules, bower_components, drop database and recreate it)

@ghost
Copy link
Copy Markdown

ghost commented Oct 15, 2016

@ivantedja, can't get that to work on this PR branch. I will try again

ghost
ghost previously requested changes Oct 19, 2016
extends ../layout
block content
include ../partials/flyer
#modal-dialog.modal.animated.wobble

This comment was marked as off-topic.

p This will really delete all of your progress and brownie points.
p We won't be able to recover any of it for you later, even if you change your mind.
.modal-footer
a.btn.btn-success.btn-block(href='/settings', data-dismiss='modal', aria-hidden='true')

This comment was marked as off-topic.

include ../partials/flyer
#modal-dialog.modal.animated.wobble
.modal-dialog
.modal-content

This comment was marked as off-topic.

@ghost
Copy link
Copy Markdown

ghost commented Oct 19, 2016

@ivantedja, as I mentioned earlier, the problem was this PR had an earlier version of staging. The PR will take a snapshot of what staging has after making a branch out of it.

@ghost ghost added status: blocked In a transient & temporary hold. and removed status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. labels Oct 19, 2016
@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Oct 19, 2016

@atjonathan I replicated the actions and modal of the delete account route so while I'm not opposed to making the changes, we should probably make them to both routes.

@Bouncey
Copy link
Copy Markdown
Member

Bouncey commented Oct 26, 2016

I'm all for removing the animations, they are so '2015'

I will pull this down again today to test

@dhcodes
Copy link
Copy Markdown
Contributor Author

dhcodes commented Oct 26, 2016

Should we open a new issue to make the UI changes since they are unrelated to the functionality of this PR? Assuming it tests okay for @Bouncey

@raisedadead
Copy link
Copy Markdown
Member

@dhcodes yes that sounds right, please open a new request for the UI changes.
We can push this if it's good.

@raisedadead raisedadead added status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. and removed status: blocked In a transient & temporary hold. labels Oct 26, 2016
@ghost ghost dismissed their stale review October 26, 2016 15:06

Opening a new issue instead.

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Everything acts as it's supposed to, I will open a PR with the styling/animation changes soon.
Thanks @dhcodes ❤️ 💪

@ghost ghost merged commit 3878998 into freeCodeCamp:staging Oct 26, 2016
@ghost ghost removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Oct 26, 2016
This pull request was closed.
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.

7 participants