-
Notifications
You must be signed in to change notification settings - Fork 28
refactor: split introduction and FAQ into separate components #3233
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
base: main
Are you sure you want to change the base?
Conversation
Bundle ReportChanges will increase total bundle size by 3.51kB (0.01%) ⬆️. 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
|
Test Results 1 files ±0 1 suites ±0 9m 20s ⏱️ -3s For more details on these errors, see this check. Results for commit 061809c. ± Comparison against base commit 78899bd. ♻️ This comment has been updated with latest results. |
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
bfb016e to
8f4e5ca
Compare
Remove the combined IntroductionAndStages component and create a new IntroductionAndFaq component to render the course description and FAQ. Update templates to use IntroductionAndFaq and Stages separately for better separation of concerns and improved maintainability.
Replace the CourseOverviewPage::Stages component with CourseOverviewPage::StageCardList in course overview and join course templates. Rename the corresponding component class and registry entry to reflect the new name. This improves naming consistency and better represents the component's purpose as a list of stage cards.
Replace the single stage list with a new StageCardList structure that groups stages by base and extensions with separate cards. This improves the UI by clearly separating base course stages from extension stages. Introduce StageCardList::Item and StageListItem components to modularize the stage display with enhanced layout and styling. Add connecting lines and state indicators for current and completed stages in StageList. Adjust component arguments to better match the new structure and support highlighting the current stage. This prepares the course overview page for improved clarity and usability when showing courses with multiple extension stages.
Remove the StageCardList and StageCardList::Item components and inline their markup directly in the course-overview and join-course templates. This change simplifies the component hierarchy and removes unnecessary wrappers by directly rendering base stages and extensions with their descriptions and stage lists in a consistent grid layout. The refactor improves maintainability by reducing indirection and allows easier styling adjustments. It also removes unused TypeScript component files associated with the deleted components.
Introduce a new StageListCard component to encapsulate the layout and styling of stage lists with their titles and descriptions. Refactor the join-course and course-overview templates to replace repeated markup with this reusable component, improving consistency and maintainability.
Rename StageList and StageListItem components and their module registry entries to StageListCardList and StageListCardListItem respectively. Update template references to reflect new full namespaced paths. These changes improve component naming consistency and better indicate their role within the StageListCard context.
Replace repeated stage list card markup in course overview and join course templates with a new StageListCardList component. This improves code clarity and reduces duplication by centralizing the rendering of base stages and extension stages into a single reusable component.
Clean up unnecessary whitespace in the course overview template to improve code readability. This change does not affect functionality but ensures consistent formatting.
Simplify stage list items by removing isCurrent and isComplete flags and always rendering the bullet point with default gray styles. This cleans up the component API and UI logic, as the visual distinction based on stage status is no longer needed.
Remove unnecessary line breaks by consolidating the StageListCard ListItem component invocation into a single line. This improves code readability and consistency without changing functionality.
Simplify styling in course overview page by removing the leading-7 class from prose elements in the introduction-and-faq and stage-list-card components. This change ensures consistent typography by relying solely on the base prose styles, improving readability and visual coherence.
Make stage list cards collapsible with a default collapsed state for extensions. This introduces an expand button overlay to reveal full content when collapsed, preventing excessive initial content height. Update titles to conditionally show "Base Stages" only if extensions are present, otherwise show "Stages". This improves clarity and UI consistency for courses with and without extensions.
8f4e5ca to
061809c
Compare
| <CourseOverviewPage::Notices @course={{this.model.course}} class="mb-4" /> | ||
| <CourseOverviewPage::IntroductionAndStages @course={{this.model.course}} class="w-full" /> | ||
| <CourseOverviewPage::IntroductionAndFaq @course={{this.model.course}} class="w-full mb-4" /> | ||
| <CourseOverviewPage::StageListCardList @course={{this.model.course}} /> |
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.
Remove the combined IntroductionAndStages component and create a new
IntroductionAndFaq component to render the course description and FAQ.
Update templates to use IntroductionAndFaq and Stages separately for
better separation of concerns and improved maintainability.
Note
Separates course intro/FAQ from stages and introduces an expandable, card-based stage list; updates templates to use the new components.
CourseOverviewPage::IntroductionAndFaqrenders@course.descriptionMarkdownand@course.frequentlyAskedQuestions(adjusted spacing, removed extra prose/margin classes).CourseOverviewPage::StageListCardListto show base stages and per-extension sections; extensions collapsed by default.CourseOverviewPage::StageListCard,::List, and::ListItemwith expand-on-click behavior and difficulty labels.IntroductionAndStageswithIntroductionAndFaq+StageListCardListinapp/templates/course-overview.hbsandapp/templates/join-course.hbs.CourseOverviewPage::IntroductionAndStagesand oldStageListusage; introducedCourseOverviewPage::StageListCard::List(updated signature/registry).Written by Cursor Bugbot for commit 061809c. This will update automatically on new commits. Configure here.