Freecodecamp: Split and simplify learn map

Created on 14 May 2020  路  12Comments  路  Source: freeCodeCamp/freeCodeCamp

To make load time faster on learn, It would be great if we could have a list of all certificates (super blocks) on the learn page and once a user clicks on a certificate from the list, they would be redirected to the intro of that super block where a super block specific map is presented.

He is the list of super blocks that should be programmatically generated.
image

And if a user clicks on the first super block they should be directed to the intro page of a that super block that has an expandable map for that specific super block .
image

client learn

All 12 comments

Hi, I would like to work on this.

@kabindrashrsth, please go ahead 馃憤. No assignment is necessary as described in our contribution docs. The first comprehensive PR will be considered for review.

@ahmadabdolsaheb hi, sorry for being late. I've spent days trying to figure out the codebase. I'm new to freeCodeCamp, could you please give me some pointers on solving this issue?

@kabindrashrsth, sure.
Here is how I would approach it.

1) look into the graphql query that is used to build the landing page.
2) look into the graphql query that is used to build the map on the learn page
3) see how map node are rendered using /components/Map component
4) see how you could customize the queries or filter the nodes to display specific superblocks.
Then, display each of those superblock maps in their intro pages.

@ojeytonwilliams, any thoughts?

That sounds like a good plan.

I had one question, though. If a user clicks on a superblock in the new map, do they get taken to a page with the superblock intro and the map? Or should the superblock intro be presented the same way as a block intro (namely just the first link in the list of challenges)?

Personally I'd prefer the latter, as I feel it would make navigation easier.

I had one question, though. If a user clicks on a superblock in the new map, do they get taken to a page with the superblock intro and the map? Or should the superblock intro be presented the same way as a block intro (namely just the first link in the list of challenges)?

Personally I'd prefer the latter, as I feel it would make navigation easier.

@ojeytonwilliams I'd prefer the latter too. (As it will make my life much easier when working on this PR 馃槄)

we could go with the second one.

@ahmadabdolsaheb thank you. I'll give it a try.

@kabindrashrsth, how is the progress on this feature?
Additionally since no assignment is necessary, the first comprehensive PR will be considered for review.

@ahmadabdolsaheb So currently what I'm trying to do is: instead of rendering blocks (the renderBlock(superBlock) function) from components/Map/components/SuperBlock.js, I'm trying to call templates/Introduction/SuperBlockIntro.js from Map/components/SuperBlock.js and then render the blocks from SuperBlockIntro.js. So when you click on a superblock, it will open the superblock intro page of that superblock and will display the list of blocks. Am I on the right track? Also, I'm sorry if I'm taking a lot of time.

That makes sense, @kabindrashrsth . I would encourage you to get your work in a draft pr, so we could see your progress as well.

@ahmadabdolsaheb I think my comments on issue #39134 are relevant here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robwelan picture robwelan  路  3Comments

trashtalka3000 picture trashtalka3000  路  3Comments

ROWn1ne picture ROWn1ne  路  3Comments

Tzahile picture Tzahile  路  3Comments

MichaelLeeHobbs picture MichaelLeeHobbs  路  3Comments