feat(course-next): add new course-next route with model and UI#3402
feat(course-next): add new course-next route with model and UI#3402rohitpaulk wants to merge 1 commit intomainfrom
Conversation
Introduce an experimental 'course-next' route with dynamic course slug parameter and a corresponding model that fetches course data including extensions, stages, and language configurations. Add a basic UI template to display course logo and name. Update layout service to recognize the new route and adjust layout behavior accordingly. This sets groundwork for testing a new course UI.
Test Results 1 files ±0 1 suites ±0 9m 22s ⏱️ - 2m 12s For more details on these errors, see this check. Results for commit e93f8e2. ± Comparison against base commit 246a16a. |
❌ 3 Tests Failed:
View the top 2 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
|
||
| return { | ||
| course: courses.find((course) => course.slug === courseSlug), | ||
| }; |
There was a problem hiding this comment.
Missing handling for non-existent course slug
The model() method uses courses.find() which returns undefined when no course matches the slug, but there's no afterModel() hook to handle this case. When a user visits /courses-next/invalid-slug, the template will crash when accessing @model.course.name on the undefined value. The course-overview route handles this correctly by checking if (!model.course) in afterModel() and transitioning to not-found.
Additional Locations (1)
| <div class="container mx-auto lg:max-w-(--breakpoint-lg) px-3 md:px-6 pt-12 pb-32"> | ||
| <h1 class="text-4xl font-semibold text-gradient-to-b from-white to-gray-300 leading-10"> | ||
| {{@model.course.name}} | ||
| </h1> |
There was a problem hiding this comment.
Text gradient invisible in light mode
The h1 element uses text-gradient-to-b from-white to-gray-300 which produces white/light gray text. Since the route sets RouteColorScheme.Both, the page supports light mode where the background is bg-gray-50. White text on a light background would be nearly invisible. Other templates using text-gradient-to-b include both light and dark variants like from-gray-950 to-gray-700 dark:from-white dark:to-gray-300.
Bundle ReportChanges will decrease total bundle size by 234.19kB (-0.6%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: client-array-pushAssets Changed:
Files in
Files in
|
Introduce an experimental 'course-next' route with dynamic course slug
parameter and a corresponding model that fetches course data including
extensions, stages, and language configurations. Add a basic UI template
to display course logo and name. Update layout service to recognize the
new route and adjust layout behavior accordingly. This sets groundwork for
testing a new course UI.
Note
Introduces an experimental course view and basic UI.
course-nextroute at/courses-next/:course_sluginrouter.tsCourseNextIndexRouteto load the selectedcourse(includingextensions,stages, andlanguage-configurations.language) and sets route color scheme toBothcourse-next/index.hbsto displayCourseLogoandcourse.namelayoutservice to hide header/footer forcourse-nextroutesWritten by Cursor Bugbot for commit e93f8e2. This will update automatically on new commits. Configure here.