Skip to content

DEV: Introduce experimental viewport-based mobile mode #32859

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

Merged
merged 1 commit into from
May 23, 2025

Conversation

davidtaylorhq
Copy link
Member

@davidtaylorhq davidtaylorhq commented May 22, 2025

Introduces the viewport_based_mobile_mode experimental site setting. When enabled, user-agent-based mobile/desktop detection will be replaced with viewport-width logic. 'mobile mode' is enabled for any viewport less than our 'sm' breakpoint (40rem, or 640px at default font size).

When this mode is enabled, mobile/desktop toggle buttons are hidden, since they are non-functional.

Tests are also updated to use a consistent method for force-enabling the legacy mobile mode. All state is now stored in lib/mobile, and the Site model references that via a getter.

@github-actions github-actions bot added i18n PRs which update English locale files or i18n related code chat PRs which include a change to Chat plugin labels May 22, 2025
Introduces the viewport_based_mobile_mode experimental site setting. When enabled, user-agent-based mobile/desktop detection will be replaced with viewport-width logic. 'mobile mode' is enabled for any viewport less than our 'sm' breakpoint (40rem, or 640px at default font size).

When this mode is enabled, mobile/desktop toggle buttons are hidden, since they are non-functional.

Tests are also updated to use a consistent method for force-enabling the legacy mobile mode. All state is now stored in `lib/mobile`, and the `Site` model references that via a getter.
@davidtaylorhq davidtaylorhq force-pushed the viewport-mobile-mode branch from 988e8f3 to bbf7a8b Compare May 23, 2025 11:07
@davidtaylorhq davidtaylorhq marked this pull request as ready for review May 23, 2025 11:07
@davidtaylorhq davidtaylorhq merged commit b15c1d2 into main May 23, 2025
16 checks passed
@davidtaylorhq davidtaylorhq deleted the viewport-mobile-mode branch May 23, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat PRs which include a change to Chat plugin i18n PRs which update English locale files or i18n related code
Development

Successfully merging this pull request may close these issues.

2 participants