-
Notifications
You must be signed in to change notification settings - Fork 17
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
rename second stage instructions card #2418
Conversation
WalkthroughThe changes in this pull request primarily involve renaming the Changes
Possibly related PRs
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
a9a394e
to
792525f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will decrease total bundle size by 190.73kB (-0.53%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (3)
app/components/course-page/course-stage-step/second-stage-tutorial-card.hbs (1)
Line range hint
9-13
: Consider replacing hardcoded statistics with dynamic dataThe completion rate is currently hardcoded to 98%, which could become outdated or misleading. As noted in the TODO comment, this should be fetched from the backend.
Would you like me to help create a GitHub issue to track the implementation of dynamic completion rate statistics?
tests/acceptance/course-page/complete-second-stage-test.js (2)
56-57
: Consider addressing the TODO comment about tab state retention.The TODO comment suggests an improvement in UX by retaining expanded/collapsed states after tab switches. This could enhance user experience by maintaining context across tab navigation.
Would you like me to help create a GitHub issue to track this enhancement? I can also assist in implementing the state retention functionality.
85-85
: Consider using a more specific assertion.The current assertion checks if the text contains "To run tests, make changes to your code". Consider using a more precise assertion that matches the exact expected message to avoid potential false positives.
-assert.contains(coursePage.secondStageTutorialCard.steps[2].instructions, 'To run tests, make changes to your code'); +assert.strictEqual( + coursePage.secondStageTutorialCard.steps[2].instructions.trim(), + 'To run tests, make changes to your code' +);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (11)
app/components/course-page/course-stage-step/second-stage-tutorial-card.hbs
(2 hunks)app/components/course-page/course-stage-step/second-stage-tutorial-card.ts
(2 hunks)app/components/course-page/course-stage-step/second-stage-tutorial-card/implement-solution-step.ts
(1 hunks)app/components/course-page/course-stage-step/second-stage-tutorial-card/read-instructions-step.ts
(1 hunks)app/components/course-page/course-stage-step/second-stage-tutorial-card/run-tests-step.ts
(1 hunks)app/templates/course/stage/instructions.hbs
(1 hunks)tests/acceptance/course-page/complete-second-stage-test.js
(3 hunks)tests/acceptance/course-page/complete-stage-without-changes-test.js
(1 hunks)tests/acceptance/course-page/course-stage-solutions-test.js
(1 hunks)tests/pages/components/course-page/course-stage-step/second-stage-tutorial-card.ts
(1 hunks)tests/pages/course-page.js
(2 hunks)
✅ Files skipped from review due to trivial changes (4)
- app/components/course-page/course-stage-step/second-stage-tutorial-card.ts
- app/components/course-page/course-stage-step/second-stage-tutorial-card/implement-solution-step.ts
- app/components/course-page/course-stage-step/second-stage-tutorial-card/read-instructions-step.ts
- app/components/course-page/course-stage-step/second-stage-tutorial-card/run-tests-step.ts
🔇 Additional comments (14)
tests/pages/components/course-page/course-stage-step/second-stage-tutorial-card.ts (1)
10-10
: LGTM! Verify the corresponding template changes.
The scope selector update aligns with the PR objective to rename "second stage instructions card" to "second stage tutorial card".
Let's verify that the corresponding template has been updated with the new ID:
✅ Verification successful
✅ Template ID has been correctly updated
The verification confirms that:
- The new ID
second-stage-tutorial-card
exists inapp/components/course-page/course-stage-step/second-stage-tutorial-card.hbs
- No occurrences of the old ID
second-stage-instructions-card
were found
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that the template file uses the new ID
# Search for the new ID in template files
rg -t hbs 'id="second-stage-tutorial-card"'
# Also check for any remaining references to the old ID to ensure complete rename
rg -t hbs 'second-stage-instructions-card'
Length of output: 273
app/components/course-page/course-stage-step/second-stage-tutorial-card.hbs (4)
1-1
: LGTM: Component ID updated consistently
The component ID has been updated to align with the new "tutorial" terminology, maintaining consistency with the broader renaming effort.
17-23
: LGTM: Component reference updated consistently
The ReadInstructionsStep component reference has been updated to use the new SecondStageTutorialCard namespace while maintaining all necessary props.
24-31
: LGTM: Component reference updated consistently
The ImplementSolutionStep component reference has been updated to use the new SecondStageTutorialCard namespace while maintaining all necessary props, including solution visibility control.
Line range hint 32-36
: LGTM: Component reference updated consistently
The RunTestsStep component reference has been updated to use the new SecondStageTutorialCard namespace while maintaining all necessary props.
Let's verify that the renaming has been consistently applied across the codebase:
✅ Verification successful
Component renaming has been consistently applied across the codebase
The verification confirms that:
- No references to the old name
SecondStageInstructionsCard
exist in the templates - The new name
SecondStageTutorialCard
is consistently used across all relevant template files:app/templates/course/stage/instructions.hbs
app/components/course-page/course-stage-step/second-stage-tutorial-card.hbs
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify consistent renaming from SecondStageInstructionsCard to SecondStageTutorialCard
# Check for any remaining references to the old name
rg "SecondStageInstructionsCard" --type-add 'template:*.{hbs,handlebars}' --type template
# Check for consistent usage of the new name
rg "SecondStageTutorialCard" --type-add 'template:*.{hbs,handlebars}' --type template
Length of output: 752
tests/acceptance/course-page/course-stage-solutions-test.js (2)
42-43
: LGTM! Setup phase renaming is consistent.
The component references in the setup phase have been correctly updated to use the new naming convention.
47-47
: LGTM! Test assertions maintain proper coverage.
The assertions have been properly updated with the new naming while maintaining comprehensive test coverage of the solution reveal functionality. The Percy snapshots ensure visual regression testing remains intact.
Also applies to: 50-52
tests/acceptance/course-page/complete-stage-without-changes-test.js (1)
77-79
: LGTM! Component reference updated correctly.
The renaming from secondStageInstructionsCard
to secondStageTutorialCard
is consistent with the PR objectives while maintaining the original test assertions.
Let's verify that this renaming is consistent across other test files:
✅ Verification successful
Renaming verified: All references consistently updated
The verification shows that:
- No instances of the old name
secondStageInstructionsCard
remain in the codebase - The new name
secondStageTutorialCard
is consistently used across all test files:- tests/pages/course-page.js (component definition)
- tests/acceptance/course-page/complete-stage-without-changes-test.js
- tests/acceptance/course-page/course-stage-solutions-test.js
- tests/acceptance/course-page/complete-second-stage-test.js
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify consistent renaming across test files
# Expect: No remaining references to the old name in test files
# Search for any remaining references to the old name
rg -g '*.js' -g '*.ts' "secondStageInstructionsCard"
# Search for the new name to confirm proper adoption
rg -g '*.js' -g '*.ts' "secondStageTutorialCard"
Length of output: 7409
app/templates/course/stage/instructions.hbs (1)
Line range hint 40-47
: LGTM! Component renamed successfully.
The renaming from SecondStageInstructionsCard
to SecondStageTutorialCard
is implemented correctly while maintaining all component properties and conditional rendering logic.
tests/acceptance/course-page/complete-second-stage-test.js (3)
40-45
: LGTM! Comprehensive initial state assertions.
The assertions thoroughly verify both completion and expansion states for all three steps, maintaining consistency with the component renaming.
95-100
: LGTM! Thorough completion state verification.
The assertions comprehensively verify the final state, ensuring all steps are complete and properly collapsed after submission.
137-139
: LGTM! Proper CLI submission handling.
The assertions correctly verify the completion state for CLI submissions, maintaining consistency with the git-based submission test case.
tests/pages/course-page.js (2)
14-14
: LGTM! Import statement updated correctly.
The import statement has been properly updated to reflect the new component name, maintaining consistency with the renaming initiative.
203-203
: LGTM! Property name updated consistently.
The property name has been updated to match the new component name, maintaining consistency with the import change and the overall renaming initiative.
@@ -37,7 +37,7 @@ | |||
{{/if}} | |||
|
|||
{{#if @model.courseStage.isSecond}} | |||
<CoursePage::CourseStageStep::SecondStageInstructionsCard | |||
<CoursePage::CourseStageStep::SecondStageTutorialCard |
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.
💡 Codebase verification
Inconsistency found in service methods still using old naming
The component has been renamed to SecondStageTutorialCard
, but the service methods in course-page-state.ts
still use the old naming convention with "Instructions":
manuallyCompletedStepIdsInSecondStageInstructions
recordManuallyCompletedStepInSecondStageInstructions
These methods should be renamed to maintain consistency with the new "Tutorial" naming.
🔗 Analysis chain
Verify consistent renaming across the codebase.
Let's ensure the renaming is consistent across all references, including documentation and test files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining references to the old component name
# and verify the new name is used consistently.
echo "Checking for any remaining references to SecondStageInstructionsCard..."
rg -i "SecondStageInstructions"
echo "\nVerifying consistent usage of new component name..."
rg -i "SecondStageTutorial"
echo "\nChecking documentation files..."
fd -e md -e mdx -e hbs | xargs rg -i "stage.*(instructions|tutorial)"
Length of output: 14611
Summary by CodeRabbit