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

show more detailed name info for blockly levels in LevelToken #37969

Merged
merged 1 commit into from Nov 23, 2020

Conversation

davidsbailey
Copy link
Member

@davidsbailey davidsbailey commented Nov 23, 2020

Curriculum Writers commented that it is important to have good level names, since it can be hard to see what changed after dragging and dropping a level. With this in mind, I noticed that levels which are defined in levels.js files all appear as "blockly" in the Lesson editor:
Screen Shot 2020-11-22 at 10 04 56 PM

This PR makes a simple fix which is to use the level "key" instead of the name. This is the same as the level name for levelbuilder-created levels, but gives more detail than just "blockly" for levels defined in levels.js files:

def key
if level_num == 'custom' || level_num.nil?
name
else
["blockly", game.name, level_num].join(':')
end
end

Screen Shot 2020-11-22 at 10 04 28 PM

This is where the key is getting set:

summary[:key] = level.key

Testing story

This seems like a small enough change that I just did manual testing to verify. I confirmed the improvement in the screenshots above, and also checked that levelbuilder-defined levels in other lessons are still showing up as they did previously:

Screen Shot 2020-11-22 at 10 09 52 PM

Reviewer 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

@davidsbailey davidsbailey merged commit 81ed723 into staging Nov 23, 2020
@davidsbailey davidsbailey deleted the level-token-level-key branch November 23, 2020 20:04
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