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

Extra breakpoints required. Missing xlarge. #431

Closed
StuartNicholls opened this issue May 17, 2023 · 3 comments · Fixed by #432
Closed

Extra breakpoints required. Missing xlarge. #431

StuartNicholls opened this issue May 17, 2023 · 3 comments · Fixed by #432

Comments

@StuartNicholls
Copy link
Contributor

Following the breakpoint update in core, we need to add in an extra large node for headers and backgrounds.

switch (Adapt.device.screenSize) {
case 'large':
backgroundImage = backgroundImages._large;
break;
case 'medium':
backgroundImage = backgroundImages._medium;
break;
default:
backgroundImage = backgroundImages._small;
}

linked to issue #430

We could add this issue in now and retain the existing functionality. See issue #430 as functionality may get updated at a later date in this issue.

@oliverfoster
Copy link
Member

oliverfoster commented May 17, 2023

That code can mimic the boxMenu code, which is much simpler, less hard-codey and does the same thing:

https://github.com/adaptlearning/adapt-contrib-boxMenu/blob/040166743e2a765a7d08bd5b4e6b08a7705ecf64/js/BoxMenuView.js#L73

It's a nice one-liner.

There's also the responsiveClasses and minimumHeights configs too.

@StuartNicholls
Copy link
Contributor Author

@oliverfoster yep, lovely

@github-actions
Copy link

🎉 This issue has been resolved in version 9.6.15 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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