Skip to content

Refine project share filtering of user inputs / add Star Wars to filtered list #67024

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 4 commits into from
Jul 11, 2025

Conversation

fisher-alice
Copy link
Contributor

@fisher-alice fisher-alice commented Jul 10, 2025

This PR refines our filtering for K-5 'open-ended' projects by only including input fields with keys that indicate user-generated text (excluding dropdown options). We recently received a Zendesk report that a project was blocked from sharing due to the animation name 'grasshopper_1'. Thus, we are updating the filtering logic to only include user-generated text.

We currently only filter Play Lab projects if they include a field name in USER_ENTERED_TEXT_INDICATORS . When I first implemented filtering of other Blockly project types, I was unsure which field names mapped to user-generated text. When curriculum writers create Blockly blocks, they also determine the field names. So currently we filter all text that is considered user input including dropdown options.

Therefore, @mikeharv and I audited all blocks (https://levelbuilder-studio.code.org/pools) to collect the list of field names that indicate open text (strings) as opposed to dropdown options across all Blockly project types (this took a bit of digging and testing).

While going through all the blocks, we realized that Star Wars's setScore block uses a string parameter that is displayed at the top of the visualization when the program is run. Thus we're adding Star Wars Blockly to list of programs to filter.

Example:
Screenshot 2025-07-11 at 8 46 04 AM

This update is based on the fact that any block field that supports open text has a field name included in the list above. Thus, we follow up and warn/prevent curriculum writers from making new free-text blocks that break this convention. Thanks Mike!.

Before update

Sprite Lab project being flagged for 'grasshopper_1':
before-grasshopper

Star Wars project that contains profanity not being flagged:
before-starwars

After update

Sprite Lab project with 'grasshopper_1' animation no longer being blocked from sharing:
after-grasshopper

Star Wars project that contains profanity blocked from sharing:
after-starwars

Links

Testing story

Tested locally on different project types (Sprite Lab, Poetry Lab, Play Lab, and Star Wars (blockly). See before/after updates above.

Deployment strategy

Follow-up work

Privacy

Security

Caching

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

@fisher-alice fisher-alice changed the title Refine project share filtering of user inputs / add Star Wars (blockly) to filtered list Refine project share filtering of user inputs / add Star Wars to filtered list Jul 11, 2025
@fisher-alice fisher-alice marked this pull request as ready for review July 11, 2025 16:23
@fisher-alice fisher-alice requested review from mikeharv and a team July 11, 2025 16:23
@fisher-alice fisher-alice merged commit 0cfecae into staging Jul 11, 2025
6 checks passed
@fisher-alice fisher-alice deleted the alice/refine-filter branch July 11, 2025 20:52
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.

2 participants