8000 test as student promotion by smallst · Pull Request #7595 · codecombat/codecombat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Conversation

smallst
Copy link
Contributor
@smallst smallst commented Jul 19, 2024

1721356310758
fix ENG-925

Summary by CodeRabbit

  • New Features

    • Introduced a modal dialog for student promotions in the teacher dashboard.
    • Added text details about testing the student experience, progress tracking, and free courses to the curriculum section.
  • Enhancements

    • Integrated the new student promotion modal into the teacher dashboard navigation.

Copy link
Contributor
coderabbitai bot commented Jul 19, 2024

Walkthrough

This 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

File Path Change Summary
app/locale/en.js Added new text to promote the "Test as Student" feature, highlighting the student experience, progress tracking, and details about the first free course.
ozaria/site/components/teacher-dashboard/common/SecondaryTeacherNavigation.vue Integrated ModalTestStudentPromotion into the component declaration and template; removed ModalHackStackBeta from the component registration but retained its template usage.
ozaria/site/components/teacher-dashboard/modals/ModalTestStudentPromotion.vue Introduced a new modal component for student promotions, featuring methods, computed properties, and styles for managing user interactions and displaying content.

Poem

In the teacher's realm, a feature unfolds,
A student's journey, a story retold.
Click to explore, with progress aligned,
Free courses await, for curious minds.
A modal of wonder, where learning takes flight,
Hop in, dear teacher, the future is bright! 🐇✨


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor
@coderabbitai coderabbitai bot left a 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

Outside diff range, codebase verification and nitpick comments (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

Commits

Files that changed from the base of the PR and between 108a157 and 2265673.

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 the SecondaryTeacherNavigation 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.'
Copy link
Contributor

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.

Suggested change
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. ',
Copy link
Contributor

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.

Suggested change
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.',
Copy link
Contributor

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.

Suggested change
test_student_promotion_2: 'You\'ll be creating a unique test account that not only mimics the student journey but also saves your progressunlike 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.',

Comment on lines +30 to +33
onTryItNow () {
this.$refs.modal.onClose()
this.trackEvent('Test as student Promo Modal: Try It Now clicked', { category: 'Teachers' })
}
Copy link
Contributor

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.

Suggested change
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' })
}

Copy link
Collaborator
@adamkecskes adamkecskes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mrfinch
Copy link
Contributor
mrfinch commented Jul 29, 2024

this can only be merged once this is merged: #7578

Copy link
Contributor
@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 2265673 and 4b55465.

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 for ModalTestStudentPromotion is correct.

The new modal component is imported correctly.


467-467: LGTM! Template inclusion for ModalTestStudentPromotion is correct.

The new modal component is included correctly in the template section.

…erNavigation.vue

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor
@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 4b55465 and 86c187f.

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

@smallst smallst merged commit 752f19b into master Aug 2, 2024
2 checks passed
@smallst smallst deleted the yuqiang/promotion-modal-for-test-student branch August 2, 2024 09:34
mrfinch added a commit that referenced this pull request Aug 6, 2024
mrfinch added a commit that referenced this pull request Aug 6, 2024
mrfinch added a commit that referenced this pull request Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0