Skip to content

Game Lab: Embed level style fix#9506

Merged
islemaster merged 4 commits into
stagingfrom
gamelab-embed-level-style-fix
Jul 14, 2016
Merged

Game Lab: Embed level style fix#9506
islemaster merged 4 commits into
stagingfrom
gamelab-embed-level-style-fix

Conversation

@islemaster

Copy link
Copy Markdown
Contributor

The TopInstructions components had hard-coded left offsets for embed levels, which looked wrong on Game Lab levels. This makes that offset configurable per-app.

Before:
screenshot from 2016-07-13 17-31-30

After:
screenshot from 2016-07-13 17-31-58

Testing

  • Created and manually tested s/allthethings/stage/19/puzzle/3 (a Game Lab embed level)
  • Added an eyes test against the new Game Lab embed level
  • Manually tested s/allthethings/stage/18/puzzle/12 (an App Lab embed level) before and after

Lets different apps set a different non-responsive visualization column width in the redux store, which TopInstructions uses instead of having a hard-coded value.

Not a wonderful, complete solution, but it's a start.
module.exports = connect(function propsFromStore(state) {
return {
isEmbedView: state.pageConstants.isEmbedView,
embedViewLeftOffset: state.pageConstants.nonResponsiveVisualizationColumnWidth + 20,

@Bjvanminnen Bjvanminnen Jul 14, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why + 20? Might be worth making this a constant or adding a comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The existing margin on App Lab embed levels was a magic 20, so I kept it. I'll extract a constant... somewhere.

@Bjvanminnen

Copy link
Copy Markdown
Contributor

lgtm

@islemaster islemaster merged commit ae6df39 into staging Jul 14, 2016
@islemaster islemaster deleted the gamelab-embed-level-style-fix branch July 14, 2016 22:56
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