-
Notifications
You must be signed in to change notification settings - Fork 481
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
Don't show Applab tutorial for students younger than 13 years #19293
Conversation
cc: @tanyaparker |
const desktop = (responsive.isResponsiveCategoryActive('lg') || responsive.isResponsiveCategoryActive('md')); | ||
|
||
const headingStyle = desktop ? styles.heading : styles.mobileHeading; | ||
|
||
var specificCardSet; | ||
switch (true) { | ||
case completedTutorialType === 'pre2017Minecraft' && isEnglish && under13: | ||
specificCardSet = 'youngerThan13pre2017MinecraftCards'; | ||
break; | ||
case completedTutorialType === 'pre2017Minecraft' && isEnglish: |
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.
I guess you could be explicit about !under13
but that might not be necessary.
If this is the image they approved then 👍 but the Minecraft image feels bolder/sharper with the gray bar like the graphic they have in previous years. |
) | ||
}, | ||
{ | ||
name: 'Other tutorial, English, student under 13', |
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.
👏 thank you for keeping all these cases clear in storybook
@@ -1,6 +1,8 @@ | |||
:ruby | |||
require 'cdo/user_helpers' | |||
congrats_data = {current_user: current_user} |
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.
is age not included in the current_user object?
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.
birthday is, but not age. Also, I learned from Poorva recently that birthday isn't really birthday, it's the date you made an account and the year of your birth calculated from the age associated with the account info at sign up. I just used the same helper that is used in the project gallery to determine age from birthday.
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.
👍 good to know
I think this will be a really positive change for users 💯 |
fyi @poorvasingal |
On /congrats when a signed-in student completes an Hour of Code, and we know they are younger than 13, we show them age-appropriate options, rather than promote the Applab tutorial.
Students younger than 13 who complete Minecraft will now see:
pre2017 v. 2017 will still be customized in the last card.
Students younger than 13 who complete any other tutorial will now see:
This change required passing userAge as a prop through the Congrats component and making a new MinecraftMarketing card (pictured above).