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

Boxmenu prevents adapt executing #195

Closed
StuartNicholls opened this issue Jun 10, 2024 · 1 comment · Fixed by #196
Closed

Boxmenu prevents adapt executing #195

StuartNicholls opened this issue Jun 10, 2024 · 1 comment · Fixed by #196
Assignees

Comments

@StuartNicholls
Copy link
Contributor

StuartNicholls commented Jun 10, 2024

Subject of the issue

Boxmenu prevents adapt from executing if background-images haven't been specified in the JSON before compiling.

Your environment

Latest versions of boxmenu

Steps to reproduce

Instal adapt from the comand line. Compile

Expected behaviour

Needs a break clause if (!backgroundImages) return but needs separating out in to functions or reconfiguring..

const backgroundImages = this.model.get('_boxMenu')?._backgroundImage;
const backgroundImage = backgroundImages[`_${device.screenSize}`] ?? backgroundImages._small;
const textAlignment = this.model.get('_boxMenu')?._menuHeader?._textAlignment;
return [
`${super.className()} boxmenu`,
backgroundImage && 'has-bg-image',
textAlignment._title && `title-align-${textAlignment._title}`,
textAlignment._body && `body-align-${textAlignment._body}`,
textAlignment._instruction && `instruction-align-${textAlignment._instruction}`
].join(' ');
..as that will then prevent textAlignment being executed.

@oliverfoster
Copy link
Member

image

@StuartNicholls StuartNicholls changed the title Boxmenu prevents adapt from compiling Boxmenu prevents adapt executing Jun 10, 2024
@oliverfoster oliverfoster moved this from New to Needs Reviewing in adapt_framework: The TODO Board Jun 10, 2024
@oliverfoster oliverfoster self-assigned this Jun 10, 2024
@github-project-automation github-project-automation bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Jun 10, 2024
github-actions bot pushed a commit that referenced this issue Jun 10, 2024
## [7.0.1](v7.0.0...v7.0.1) (2024-06-10)

### Fix

* Guards for missing configs (fixes #195) (#196) ([fb59fe5](fb59fe5)), closes [#195](#195) [#196](#196)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants