Skip to content
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

[Google Blockly] CT-180: Add single user experiment to persist Google Blockly across levels #55068

Merged
merged 4 commits into from
Nov 22, 2023

Conversation

ebeastlake
Copy link
Contributor

@ebeastlake ebeastlake commented Nov 20, 2023

Warning!!

We have entered Pixel Lock for Hour of Code!

Computer Science Education Week will be happening from Dec 4 - Dec 10. Alongside this event, we will
be launching our new Hour of Code activity. Please consider any risk introduced in this PR that
could affect Dance Lab, instructions, saving and logging student progress, caching, or anything
related to the Hour of Code activities, old or new. Even small changes, such as a different button
color, are considered significant during this time. If this change will affect the new Hour of Code
activity in any way, join the morning change review to get your changes approved prior to merging.
Reach out to the Student Labs team for more details!

Typically, we control the Blockly version using a URL param that is not sticky between levels, like ?blocklyVersion=google or ?blocklyVersion=cdo. Before the bug bash for the Sprite Lab migration to mainline Blockly, we want to allow users to enroll in a SingleUser experiment that would persist their choice between levels/labs. This will also make it easier for those of us working on migrating a specific lab to consistently use a given Blockly version without always having to re-add the URL parameter.

To enroll: /experiments/set_single_user_experiment/google_blockly
To unenroll: /experiments/disable_single_user_experiment/google_blockly

Links

Jira ticket: https://codedotorg.atlassian.net/browse/CT-180

Testing story

Tested that enrolling and unenrolling from the experiment works and that the existing URL params also still work as intended.

The video is too big for Github so here's a link: https://drive.google.com/file/d/1jyc-P4wo5-CwbyEZZ8dOQyHBRkawo29d/view?usp=sharing

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@ebeastlake ebeastlake changed the title [Google Blocklyadd single user experiment to persist google blockly across levels [Google Blockly] CT-180: Add single user experiment to persist Google Blockly across levels Nov 20, 2023
return true if view_options[:blocklyVersion]&.downcase == 'google'
return false if view_options[:blocklyVersion]&.downcase == 'cdo'
return false unless @level.uses_google_blockly?

# Only check DCDO flag if level type uses Google Blockly to avoid performance hit.
DCDO.get('disable_google_blockly', []).map(&:downcase).exclude?(@level.class.to_s.downcase)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed because this is no longer needed.

@ebeastlake ebeastlake requested a review from a team November 20, 2023 23:43
Copy link
Contributor

@molly-moen molly-moen left a comment

Choose a reason for hiding this comment

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

🎉

@ebeastlake ebeastlake merged commit 5e5b0c3 into staging Nov 22, 2023
2 checks passed
@ebeastlake ebeastlake deleted the task/ct-180/blockly-version-experiment branch November 22, 2023 00:55
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.

None yet

2 participants