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

Remove indentation of textarea contents #20933

Merged
merged 1 commit into from Mar 1, 2018
Merged

Conversation

balderdash
Copy link
Contributor

This only applies to local development, but if you're running levelbuilder in mode and edit a level with some textarea fields (e.g. animation json in gamelab, toolbox blocks xml in blockly levels, etc.), the contents will be indented a few extra spaces. If you hit save, it'll add that whitespace to the level's property, and the next time you open the edit page it'll be doubly indented!

This PR uses haml's whitepsace preservation operator to de-indent the contents of these textareas.

@balderdash balderdash requested a review from Hamms March 1, 2018 19:18
Copy link
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

Any idea why this only happens locally, and not on the actual levelbuilder server?

@balderdash
Copy link
Contributor Author

I'm pretty sure it's because haml is running in ugly mode on levelbuilder (i.e. it doesn't nicely indent the generated html), but I can't find where that's configured.

Copy link
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

Ahh, that makes sense. I'm just paranoid about this change affecting the behavior of the levelbuilder server, but it sounds like that shouldn't happen.

We should still keep an eye out for this PR hitting levelbuilder, and double-check that all is still fine when it hits.

@balderdash balderdash merged commit 48c8042 into staging Mar 1, 2018
@balderdash balderdash deleted the no-indent-textarea branch March 3, 2018 00:22
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