File tree Expand file tree Collapse file tree 8 files changed +8
-19
lines changed
course-admin/stage-insights-page
utils/course-page-step-list Expand file tree Collapse file tree 8 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 1818 <div class =" flex flex-col items-end" >
1919 <LinkTo
2020 @route =" course.stage.instructions"
21- @models ={{ array @stage.course.slug @stage.identifierForURL }}
21+ @models ={{ array @stage.course.slug @stage.slug }}
2222 class =" text-gray-400 flex items-center hover:text-gray-600"
2323 target =" _blank"
2424 rel =" noopener noreferrer"
Original file line number Diff line number Diff line change 11<LinkTo
22 @route =" course.stage.instructions"
3- @models ={{ array @stage.course.slug @stage.identifierForURL }}
3+ @models ={{ array @stage.course.slug @stage.slug }}
44 class =" block hover:bg-gray-50 dark:hover:bg-gray-700/50 py-1.5 -mx-1.5 px-1.5 rounded-sm"
55 data-test-stage-list-item
66 ...attributes
Original file line number Diff line number Diff line change @@ -70,10 +70,6 @@ export default class CourseStageModel extends Model {
7070 return this . screencasts . length > 0 ;
7171 }
7272
73- get identifierForURL ( ) {
74- return this . slug ;
75- }
76-
7773 get isBaseStage ( ) {
7874 return ! this . primaryExtensionSlug ;
7975 }
Original file line number Diff line number Diff line change @@ -50,8 +50,7 @@ Router.map(function () {
5050 this . route ( 'introduction' ) ;
5151 this . route ( 'setup' ) ;
5252
53- // Stage identifier either be '1' (for base stages) or 'ext2:1' (for extension stages)
54- this . route ( 'stage' , { path : '/stages/:stage_identifier' } , function ( ) {
53+ this . route ( 'stage' , { path : '/stages/:stage_slug' } , function ( ) {
5554 this . route ( 'code-examples' ) ;
5655 this . route ( 'concepts' ) ;
5756 this . route ( 'instructions' , { path : '/' } ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default class CourseStageRoute extends BaseRoute {
2424 async model ( params ) {
2525 const courseRouteModel = this . modelFor ( 'course' ) ;
2626
27- const courseStage = courseRouteModel . course . stages . find ( ( courseStage ) => courseStage . identifierForURL === params . stage_identifier ) ;
27+ const courseStage = courseRouteModel . course . stages . find ( ( courseStage ) => courseStage . slug === params . stage_slug ) ;
2828
2929 return {
3030 courseStage : courseStage ,
Original file line number Diff line number Diff line change @@ -51,12 +51,11 @@ export default class CoursePageStateService extends Service {
5151 } else if ( this . router . currentRouteName && this . router . currentRouteName . startsWith ( 'course.stage' ) ) {
5252 const courseStageRoute = this . router . currentRoute . find ( ( route : { name : string } ) => route . name === 'course.stage' ) ;
5353
54- const routeParams = courseStageRoute ! . params as { stage_identifier : string } ;
55- const stageIdentifier = routeParams . stage_identifier ;
54+ const routeParams = courseStageRoute ! . params as { stage_slug : string } ;
5655
5756 return (
5857 this . stepList ! . steps . find (
59- ( step ) => step . type === 'CourseStageStep' && ( step as CourseStageStep ) . courseStage . identifierForURL === stageIdentifier ,
58+ ( step ) => step . type === 'CourseStageStep' && ( step as CourseStageStep ) . courseStage . slug === routeParams . stage_slug ,
6059 ) || null
6160 ) ;
6261 } else {
Original file line number Diff line number Diff line change 11<div class =" bg-white min-h-screen" >
22 <div class =" container mx-auto pt-4 pb-10 px-6" >
33 <div class =" py-3 border-b border-gray-200 mb-6" >
4- <TertiaryLinkButton
5- @route =" course.stage.code-examples"
6- @models ={{ array @model.solution.courseStage.identifierForURL }}
7- @size =" small"
8- class =" pl-1.5 mb-3"
9- >
4+ <TertiaryLinkButton @route =" course.stage.code-examples" @models ={{ array @model.solution.courseStage.slug }} @size =" small" class =" pl-1.5 mb-3" >
105 <div class =" flex items-center" >
116 {{ svg-jar " arrow-circle-left" class =" w-4 h-4 mr-1.5 text-gray-500" }}
127
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ Check the [How to pass this stage](#first-stage-tutorial-card) section for instr
121121 get routeParams ( ) {
122122 return {
123123 route : 'course.stage.instructions' ,
124- models : [ this . courseStage . course . slug , this . courseStage . identifierForURL ] ,
124+ models : [ this . courseStage . course . slug , this . courseStage . slug ] ,
125125 } ;
126126 }
127127
You can’t perform that action at this time.
0 commit comments