New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make challenges easier to navigate #10239
make challenges easier to navigate #10239
Conversation
@@ -111,6 +111,7 @@ export class StepChallenge extends PureComponent { | |||
href={ action } | |||
onClick={ completeAction } | |||
target='_blank' | |||
className='unlockStep' |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Please ensure you actually test the things locally by manual testing, and executing |
9e70440
to
695acb1
Compare
@sachinmour updated the pull request. |
@raisedadead why is snyk checks are failing... it is not showing in my local branch.. |
@@ -134,7 +135,7 @@ export class StepChallenge extends PureComponent { | |||
<Button | |||
bsSize='large' | |||
bsStyle='primary' | |||
className='col-sm-4 col-xs-12' | |||
className='col-sm-4 col-xs-12 previousStep' |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
To do it with react and redux.... |
@sachinmour Awesome - once you are done with that let me know - I'm excited to try it out :) What happens when there's a "click here to open link in new tab" button on the slide? |
@sachinmour updated the pull request. |
1 similar comment
@sachinmour updated the pull request. |
e6a74e3
to
9ebe4bb
Compare
@sachinmour updated the pull request. |
@QuincyLarson when there's a click - button "click here to open link in new tab" slides into view. |
const { Mousetrap } = global; | ||
Mousetrap.bind('right', this.handleNextClick); | ||
Mousetrap.bind('left', this.handleBackClick); | ||
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@BerkeleyTrue can i use dom to get current Index.(i.e from counters). |
Through the getState function. The whole app is a function of the state. You then use actions dispatched through redux to change the view, which in turn update the state |
ok.. now i can get current index from the state.. but don't have total number of steps in the state... how do i get that.. |
It's the number of items in the description array. |
It's coming from the challengeSelector, which in-turn gets it from the entities. I might need to add a step epic to handle step transitions as there is to much info needed ahead of time and would make the mouse trap epic coupled with the step challenge. |
@sachinmour This PR should make it easier #10417 once it is merged |
@sachinmour That PR has been merged. It should now be trivial to add those navigation traps without needing to access state. |
@@ -178,6 +190,7 @@ export class StepChallenge extends PureComponent { | |||
key={ imgUrl } | |||
> | |||
<a | |||
className='fixed-height' |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@sachinmour Are you still working on this? |
I don't have total number of steps in the state... i am not able to get that even after the change.. |
you don't need them. That was the point of the change. |
ok.. but then if i don't know if the user is on the last step and i call stepForward instead of submitChallenge, that results in an error. |
That shouldn't be the case. StepForward should submit the challenge on the last step |
Can you provide a stack trace? |
Its a very long stack trace... |
@sachinmour I can't replicate. Looks like you are going to need to do some debugging to figure out the issue on your end. |
@sachinmour Are you still able to work on this? |
@BerkeleyTrue i am not able to figure out what my machine is doing wrong.. as you don't see any errors in your machine.. can you fix this.. |
Try blowing away your node_modules. rebase off of current staging, and npm install. Also make sure you are using node 6 and npm 3 |
9ebe4bb
to
5412b61
Compare
@sachinmour updated the pull request. |
@sachinmour, what's the status of this PR @sachinmour ? |
@atjonathan this doesn't work.. i have tried all possible ways.. blowing my node modules folder and everything.. |
@sachinmour try asking in the Contributors room for help, otherwise we can reopen this issue as help wanted. |
Pre-Submission Checklist
staging
branch of FreeCodeCamp.fix/
,feature/
, ortranslate/
.npm run test-challenges
.Type of Change
Checklist:
Description