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

Revert "Revert "Prep final clean"" #35222

Merged
merged 2 commits into from Jun 9, 2020

Conversation

dmcavoy
Copy link
Contributor

@dmcavoy dmcavoy commented Jun 9, 2020

Re-implements #35177

Forgot to rebase and get tests to run before merging. The DTT failed with:

https://codedotorg.slack.com/files/UABGK3UCB/F0150KMESLD/screen_shot_2020-06-08_at_4.47.49_pm.png?origin_team=T039SAH7W&origin_channel=DERLX5EMN

I moved the script call back into the dsl.html.haml file and recomplied javascript to check that it was working.

Comment on lines +1 to +3
- if @level.supports_markdown?
- content_for(:head) do
%script{src: webpack_asset_path('js/levels/editors/_dsl.js')}
Copy link
Member

Choose a reason for hiding this comment

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

this is fine to get unblocked, but, ideally we want to keep these kind of conditional partials simple, with a haml file unconditionally including the corresponding js file when possible. in this particular case, the js file could simply recover gracefully if the DOM element it is looking for doesn't load.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like the only DSL defined level that does not have supports_markdown? is LevelGroup. I could just pull out Level Group as its own partial to solve this. I won't do it here but if you think thats the right move I can do it in a follow up

@dmcavoy dmcavoy merged commit 2be71a2 into staging Jun 9, 2020
@dmcavoy dmcavoy deleted the revert-35221-revert-35177-prep-final-clean branch June 9, 2020 14:07
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