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
Projects: Minecraft Aquatic in the project widget #25691
Conversation
const { showFullList } = this.state; | ||
const GAMES_AND_EVENTS = includeDanceParty ? | ||
['spritelab', 'dance','flappy', 'starwarsblocks', 'starwars', 'bounce', 'sports', 'basketball'] : | ||
['spritelab','flappy', 'starwarsblocks', 'starwars', 'bounce', 'sports', 'basketball']; | ||
|
||
const MINECRAFT = includeMCAquatic ? |
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.
nit: you can use the unshift
method to prepend to an array and avoid repetition:
let minecraft_buttons = ['minecraft_hero', 'minecraft_designer', 'minecraft_adventurer'];
if (includeMCAquatic) {
minecraft_buttons.unshift('minecraft_aquatic');
}
@@ -8,6 +8,8 @@ | |||
- homepage_data[:topCourse] = @top_course | |||
- homepage_data[:isEnglish] = @is_english | |||
- homepage_data[:includeDanceParty] = DCDO.get("dance_projects", false) | |||
- hoc_launch = DCDO.get("hoc_launch", nil) | |||
- homepage_data[:includeMCAquatic] = !hoc_launch.nil? |
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.
just to be safe, i think we should check the the value of hoc_launch
matches an acceptable value ('mc' or 'dance':
- homepage_data[:includeMCAquatic] = ['mc', 'dance'].include? hoc_launch
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.
- homepage_data[:includeMCAquatic] = !hoc_launch.nil? | |
- homepage_data[:includeMCAquatic] = ['mc', 'dance'].include? hoc_launch |
@@ -7,6 +7,8 @@ | |||
- projects_data[:canViewAdvancedTools] = !(current_user.under_13? && current_user.terms_version.nil?) | |||
- projects_data[:canShare] = !current_user.sharing_disabled? | |||
- projects_data[:includeDanceParty] = DCDO.get("dance_projects", false) | |||
- hoc_launch = DCDO.get("hoc_launch", nil) | |||
- projects_data[:includeMCAquatic] = !hoc_launch.nil? |
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.
same as above
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.
- projects_data[:includeMCAquatic] = !hoc_launch.nil? | |
- projects_data[:includeMCAquatic] = ['mc', 'dance'].include? hoc_launch |
@@ -2,6 +2,8 @@ | |||
- projects_data = {} | |||
- projects_data[:limitedGallery] = limited_gallery | |||
- projects_data[:includeDanceParty] = DCDO.get("dance_projects", false) | |||
- hoc_launch = DCDO.get("hoc_launch", nil) | |||
- projects_data[:includeMCAquatic] = !hoc_launch.nil? |
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.
same as above
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.
- projects_data[:includeMCAquatic] = !hoc_launch.nil? | |
- projects_data[:includeMCAquatic] = ['mc', 'dance'].include? hoc_launch |
Very similar to #25498.
If the DCDO
hoc_launch
flag is set, a button to make new Minecraft Aquatic projects will show as the first Minecraft option in the expanded project type list of the project widget. This button will show on the public project gallery widget, the signed in projects gallery widget and the projects widget on the signed in homepage.The DCDO check and prop
includeMCAquatic
will be removed post-launch.