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

Add ability to set mobile as default viewport #1898

Open
marcusforsberg opened this issue Oct 9, 2024 · 0 comments
Open

Add ability to set mobile as default viewport #1898

marcusforsberg opened this issue Oct 9, 2024 · 0 comments

Comments

@marcusforsberg
Copy link

Is your feature request related to a problem? Please describe.
With the majority of web traffic occuring on mobile, we always encourage our clients to check the "mobile" viewport in the Presentation tool. With certain sites receiving around 85-90% mobile traffic, we'd like to have the Presentation tool always default to the "Mobile" viewport instead of the "Desktop".

This would save editors the extra click and also help remind them to actually check the mobile viewport, where currently some of our editors are stuck in the desktop-first or desktop-only mindset.

Describe the solution you'd like
I think an option on the Presentation tool would do the trick, say defaultViewport.
If unset it would default to desktop being the default as it is today. This gives the option to customize this on a per-project basis:

 presentationTool({
    // ...,
   defaultViewport: 'mobile'
 },

Ideally, it would be great if the user's preferred viewport option was also saved in local storage, as is the case with the pane sizing today.

Describe alternatives you've considered
We're currently doing some hacky router state sniffing to try and make this work, but it's not ideal and doesn't cover all scenarios.

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

No branches or pull requests

1 participant