Split Blockly#blockly_options into blockly_app_options and blockly_level_options#9300
Conversation
Conflicts: dashboard/scripts/ideal_level_sources_to_test_json.rb
|
|
||
| def blockly_app_options(game, skin_id) | ||
| options = Rails.cache.fetch("#{cache_key}/blockly_app_options/v2") do | ||
|
|
There was a problem hiding this comment.
Style/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
|
I love seeing a refactor like this that ultimately adds so few lines! Didja talk to Will about the current app/level options split? |
| app: game.try(:app), | ||
| droplet: game.try(:uses_droplet?), | ||
| pretty: Rails.configuration.pretty_apps ? '' : '.min', | ||
| }) |
There was a problem hiding this comment.
I believe our styleguide prefers these to be all left-aligned:
app_options.merge!({
baseUrl: Blockly.base_url,
app: game.try(:app),
droplet: game.try(:uses_droplet?),
pretty: Rails.configuration.pretty_apps ? '' : '.min',
})
|
This look quite good, but I'd love to chat briefly about the motivation behind this change just to make sure I actually understand the context. |
|
Talked to Will about the As a sanity check, I compared appOptions before and after this change on a random level (/course4/stage/16/puzzle/4). Aside from timestamps and a couple props being reordered, they're identical. |
|
LGTM! |
Working toward generating
blockly_level_optionsmultiple times.