-
Notifications
You must be signed in to change notification settings - Fork 4.1k
test as student promotion #7595
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
Conversation
WalkthroughThis update enhances the teacher dashboard by introducing a "Test as Student" feature, allowing educators to experience the platform from a student's perspective. Key additions include a new modal for promoting this feature, updates to the navigation for easier access, and new localization strings that guide users on the benefits of engaging with the feature. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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: 4
ozaria/site/components/teacher-dashboard/modals/ModalTestStudentPromotion.vue (4)
1-5
: Optimize import statements.Consider importing only the required mapGetters functions to reduce the bundle size.
- import { mapGetters } from 'vuex' + import { mapGetters } from 'vuex'
22-23
: Clarify date comparison logic.The date comparison logic can be simplified for better readability.
- const Date(new Date() - 24 * 60 * 60 * 1000) + const Date(Date.now() - 24 * 60 * 60 * 1000)
38-76
: Ensure accessibility of modal content.Add appropriate ARIA roles and labels to improve accessibility.
- <div> + <div role="dialog" aria-labelledby="modal-title" aria-describedby="modal-description">
78-104
: Use consistent units for padding.Ensure consistent usage of units for padding values.
- padding: 10px 60px; + padding: 10px 3.75rem;
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
app/assets/images/pages/teachers/dashboard/teacher_test_as_student.png
is excluded by!**/*.png
Files selected for processing (3)
- app/locale/en.js (1 hunks)
- ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue (2 hunks)
- ozaria/site/components/teacher-dashboard/modals/ModalTestStudentPromotion.vue (1 hunks)
Additional comments not posted (2)
ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue (2)
7-7
: Import statement looks good.The import statement for
ModalTestStudentPromotion
is correct.
13-13
: Component integration looks good.The
ModalTestStudentPromotion
component is correctly integrated into theSecondaryTeacherNavigation
component.Also applies to: 406-406
app/locale/en.js
Outdated
our_curriculum_empowers_students: 'Our curriculum empowers students to use AI to create websites, games, art, and more. Currently in beta.', | ||
test_student_promotion_1: 'Ready to walk a mile in your students\' coding shoes? Clicking "Test as Student" lets you dive into the learning experience firsthand. ', | ||
test_student_promotion_2: 'You\'ll be creating a unique test account that not only mimics the student journey but also saves your progress — unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don\'t keep track of where you\'ve been.', | ||
test_student_promotion_3: 'Your first course is free. Ready for more? We\'ll guide you on adding a license for continued learning adventures.' |
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.
Ensure clarity and consistency in the localization string.
The string is clear and concise. However, consider rephrasing for better readability:
- Your first course is free. Ready for more? We'll guide you on adding a license for continued learning adventures.
+ Your first course is free. Ready for more? We'll guide you on adding a license for continued learning.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
test_student_promotion_3: 'Your first course is free. Ready for more? We\'ll guide you on adding a license for continued learning adventures.' | |
test_student_promotion_3: 'Your first course is free. Ready for more? We\'ll guide you on adding a license for continued learning.' |
@@ -1773,7 +1773,10 @@ module.exports = { | |||
start_teaching_ai_today: 'Start Teaching AI Today!', | |||
hackstack_beta_release: 'HackStack Beta Release', | |||
introducing_ai_hackstack: 'Introducing AI HackStack, a generative AI teaching tool for beginners. It provides safe access to top AI models like ChatGPT, Claude, and DALL-E.', | |||
our_curriculum_empowers_students: 'Our curriculum empowers students to use AI to create websites, games, art, and more. Currently in beta.' | |||
our_curriculum_empowers_students: 'Our curriculum empowers students to use AI to create websites, games, art, and more. Currently in beta.', | |||
test_student_promotion_1: 'Ready to walk a mile in your students\' coding shoes? Clicking "Test as Student" lets you dive into the learning experience firsthand. ', |
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.
Ensure clarity and consistency in the localization string.
The string is clear and concise. However, consider rephrasing for better readability:
- Ready to walk a mile in your students' coding shoes? Clicking "Test as Student" lets you dive into the learning experience firsthand.
+ Ready to walk a mile in your students' coding shoes? Click "Test as Student" to dive into the learning experience firsthand.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
test_student_promotion_1: 'Ready to walk a mile in your students\' coding shoes? Clicking "Test as Student" lets you dive into the learning experience firsthand. ', | |
test_student_promotion_1: 'Ready to walk a mile in your students\' coding shoes? Click "Test as Student" to dive into the learning experience firsthand. ', |
our_curriculum_empowers_students: 'Our curriculum empowers students to use AI to create websites, games, art, and more. Currently in beta.' | ||
our_curriculum_empowers_students: 'Our curriculum empowers students to use AI to create websites, games, art, and more. Currently in beta.', | ||
test_student_promotion_1: 'Ready to walk a mile in your students\' coding shoes? Clicking "Test as Student" lets you dive into the learning experience firsthand. ', | ||
test_student_promotion_2: 'You\'ll be creating a unique test account that not only mimics the student journey but also saves your progress — unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don\'t keep track of where you\'ve been.', |
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.
Ensure clarity and consistency in the localization string.
The string is clear and concise. However, consider rephrasing for better readability:
- You'll be creating a unique test account that not only mimics the student journey but also saves your progress — unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don't keep track of where you've been.
+ You'll create a unique test account that mimics the student journey and saves your progress. This is unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don't track your progress.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
test_student_promotion_2: 'You\'ll be creating a unique test account that not only mimics the student journey but also saves your progress — unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don\'t keep track of where you\'ve been.', | |
test_student_promotion_2: 'You\'ll create a unique test account that mimics the student journey and saves your progress. This is unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don\'t track your progress.', |
onTryItNow () { | ||
this.$refs.modal.onClose() | ||
this.trackEvent('Test as student Promo Modal: Try It Now clicked', { category: 'Teachers' }) | ||
} |
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.
Ensure modal reference existence.
Check if the modal reference exists before calling onClose to avoid potential errors.
- this.$refs.modal.onClose()
+ if (this.$refs.modal) {
+ this.$refs.modal.onClose()
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
onTryItNow () { | |
this.$refs.modal.onClose() | |
this.trackEvent('Test as student Promo Modal: Try It Now clicked', { category: 'Teachers' }) | |
} | |
onTryItNow () { | |
if (this.$refs.modal) { | |
this.$refs.modal.onClose() | |
} | |
this.trackEvent('Test as student Promo Modal: Try It Now clicked', { category: 'Teachers' }) | |
} |
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.
LGTM
this can only be merged once this is merged: #7578 |
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, codebase verification and nitpick comments (3)
app/locale/en.js (3)
1784-1784
: Ensure clarity and consistency in the localization string.The string is clear and concise. However, consider rephrasing for better readability:
- Ready to walk a mile in your students' coding shoes? Clicking "Test as Student" lets you dive into the learning experience firsthand. + Ready to walk a mile in your students' coding shoes? Click "Test as Student" to dive into the learning experience firsthand.
1785-1785
: Ensure clarity and consistency in the localization string.The string is clear and concise. However, consider rephrasing for better readability:
- You'll be creating a unique test account that not only mimics the student journey but also saves your progress — unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don't keep track of where you've been. + You'll create a unique test account that mimics the student journey and saves your progress. This is unlike the quick previews in our curriculum guide, which are great for a sneak-peek but don't track your progress.
1786-1786
: Ensure clarity and consistency in the localization string.The string is clear and concise. However, consider rephrasing for better readability:
- Your first course is free. Ready for more? We'll guide you on adding a license for continued learning adventures. + Your first course is free. Ready for more? We'll guide you on how to add a license for continued learning adventures.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- app/locale/en.js (1 hunks)
- ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue (2 hunks)
Additional comments not posted (2)
ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue (2)
7-7
: LGTM! Import statement forModalTestStudentPromotion
is correct.The new modal component is imported correctly.
467-467
: LGTM! Template inclusion forModalTestStudentPromotion
is correct.The new modal component is included correctly in the template section.
ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue
Outdated
Show resolved
Hide resolved
…erNavigation.vue Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue
fix ENG-925
Summary by CodeRabbit
New Features
Enhancements