freeCodeCamp / curriculum

The freeCodeCamp curriculum and lesson editor
Creative Commons Attribution Share Alike 4.0 International
81 stars 124 forks source link

fix(challenges): change challengeType to fix help button #307

Closed ojeytonwilliams closed 5 years ago

ojeytonwilliams commented 5 years ago

Description

This changes the challengeType of some challenges so that their 'Ask for help' buttons redirect to the correct sub-forum, as discussed in freecodecamp/learn#259. In isolation, this doesn't fix that issue, but it is part of the solution.

Pre-Submission Checklist

Checklist:

Closes #XXXXX

scissorsneedfoodtoo commented 5 years ago

Everything LGTM! Tested all of the challenges you changed, along with many others in each affected section, and they all auto populate the correct category in the forum.

Just going to request another review since this PR works in conjunction with https://github.com/freeCodeCamp/learn/pull/284.

ojeytonwilliams commented 5 years ago

Hey, @Bouncey, there's a slight issue with that. Currently challengeType modern crops up here https://github.com/freeCodeCamp/learn/blob/2ab773dbad7c60ac5556fdbf26b13265cf3c15c3/src/templates/Challenges/classic/Show.js#L211-L213 and this affects https://github.com/freeCodeCamp/learn/blob/2ab773dbad7c60ac5556fdbf26b13265cf3c15c3/src/templates/Challenges/classic/Show.js#L232-L241

So, changing the challengeType to 1 would mean the preview pane would not appear. Obviously setting challengeType to 0 doesn't work either, since that would redirect to the wrong help forum.

Bouncey commented 5 years ago

Ohhhhhhhh.

Yes, thank you for reminding me. Ignore my bumbling then. I need more coffee

ojeytonwilliams commented 5 years ago

You're welcome! By the way, speaking of artifacts, I noticed there is the property 'helpRoom' that's unused. I couldn't find anywhere it's used, but I forgot about it after I realised how the forum was actually selected. I should have included that in this PR, but it completely slipped my mind...