refactor: blockType -> blockLabel#62548
Conversation
|
For mobile, I think the easiest change would be:
This is technically a breaking change, so do we want to... um... bump the external data version? |
|
Well actually, I wonder if we should keep We'll need to bump the script version at some point, once FSD is replaced with the checkpoint certs and the English super blocks are converted to the chapter structure. |
|
Both strategies seem fine to me, so I'd go with whichever seems like less hassle. Presumably rolling this change into the v3 you had planned? I'll leave this blocked until we've got a clear path forward. |
|
Yeah, I'd vote to keep |
|
I think this should work. It's compliant with the schema, at least. |
30cd228 to
e47b78d
Compare
challengeType is already used to distinguish between different challenges. In contrast, blockType is (now) only used to select the block's label
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
a55b486 to
b68d44d
Compare
|
We've got a type check error apparently. |
Checklist:
mainbranch of freeCodeCamp.The name
blockTypesuggests that it should be used to differentiate between different kinds of blocks. This is quite vague and it already has a specific use: selecting which label to render. Calling itblockLabelmakes it's role clear and should make further abuse less likely.The one case where it was meaningful (when determining if a donation modal should appear) I used
challengeTypeinstead.challengeTypeis already used to differentiate between different kinds of challenges, so this is a least consistent with how it is already used. One idea we've discussed is splittingchallengeTypeinto more focused, more descriptive elements. I opted not to do that here to keep the change as simple as possible.@freeCodeCamp/mobile I've changed the external curriculum. What do we need to change to handle that?