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

[5.x] Live Preview: Allow changing the position of "Responsive" device option #11404

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

duncanmcclean
Copy link
Member

Right now, in Live Preview, the "Responsive" option is always the first and default option.

However, if most of your users are viewing your articles on mobile, you might want to change the order of the options so "Mobile" is at the top:

CleanShot 2025-01-29 at 11 39 01

This pull request allows you to do that. Simply add a Responsive device to the live-preview.devices config option, and it'll work.

'devices' => [
        'Laptop' => ['width' => 1440, 'height' => 900],
        'Tablet' => ['width' => 1024, 'height' => 786],
        'Mobile' => ['width' => 375, 'height' => 812],
+       'Responsive' => [],
],

CleanShot 2025-01-29 at 11 38 22

The Live Preview will also default to whatever the first option in the devices list is.

@duncanmcclean duncanmcclean changed the title [5.x] Live Preview: Allow changing the position of "Reponsive" device option [5.x] Live Preview: Allow changing the position of "Responsive" device option Jan 29, 2025
@jasonvarga jasonvarga merged commit 37fe836 into 5.x Jan 29, 2025
19 checks passed
@jasonvarga jasonvarga deleted the change-order-of-live-preview-device-options branch January 29, 2025 14:34
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