-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat(components): Create LessonTabs #2394
feat(components): Create LessonTabs #2394
Conversation
@flacial is attempting to deploy a commit to the c0d3-prod Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #2394 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 184 185 +1
Lines 3286 3285 -1
Branches 874 872 -2
=========================================
- Hits 3286 3285 -1
|
const tabs = [ | ||
...(lesson.docUrl ? [{ text: 'lesson', url: lesson.docUrl }] : []), | ||
{ text: 'challenges', url: `/curriculum/${lesson.slug}` }, | ||
{ text: 'exercises', url: `/exercises/${lesson.slug}` }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well add this path to the constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exercises shouldn't be under /exercises
but something like /curriculum/js0/exercises
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i also think the mentor path needs a bit more thought!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exercises shouldn't be under /exercises but something like /curriculum/js0/exercises.
@flacial Can you explain your reasoning on why the above should mean that we shouldn't make a /exercises
constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought /exercises/js0
would make things inconsistent with the way we manage things that are related to a lesson (e.g, challenges) and thus it should be changed to something like /curriculum/js0/exercises
. But it appears the lesson submissions are under /review/js0
.
I'l create one for /exercises
in a different PR as this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought /exercises/js0 would make things inconsistent with the way we manage things that are related to a lesson (e.g, challenges) and thus it should be changed to something like /curriculum/js0/exercises.
I'm not understanding the reasoning -- even if the path is /curriculum/js0/exercises
, why do you think a /exercises
constant should still not be made for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought /exercises/js0 would make things inconsistent with the way we manage things that are related to a lesson (e.g, challenges) and thus it should be changed to something like /curriculum/js0/exercises.
I'm not understanding the reasoning -- even if the path is
/curriculum/js0/exercises
, why do you think a/exercises
constant should still not be made for that?
I decided not to add that constant because, based on the possibility of introducing inconsistency in how we manage things that are related to a lesson, we could change the exercises' paths before launching DOJO. I was wrong as we already have the /review/[lessonSlug]
path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that since we are going to need /exercises
in the path it would be a good idea to make the constant anyway(which I see you note you'll do in another PR). Whether the path is /curriculum/js0/exercises
or /exercises/js0
it needs /exercises
. The reason I think /exercises
should be a constant is because of its high potential for reusability -- if you search the path /curriculum
for example, you can find a lot of results of its usage,
https://github.com/garageScript/c0d3-app/search?p=4&q=%2Fcurriculum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea. By creating the exercises constant, we can join constants to create paths like the following CURRICULUM_PATH/[lessonSlug]/EXERCISES_PATH
.
…of github.com:flacial/c0d3-app into 2029-dojomentorpage-list-mentor-submitted-exercises/5
Related to #2029
Description
For each lesson sub-page such as exercises, mentor exercises, challenges, and lesson, we create a the
NavTab
in all of them. To keep it DRY, this PR create a component that'll be used in all of the lesson pages.Before:
After:
Testing
/exercise/js0