Skip to content

Kai Code: Only allow the expanded widget on viewports with room for it - #174

Merged
boehlerlukas merged 1 commit into
masterfrom
kai-code/4dc7f75eadb0e18f71944376-36e00863-dbe0-4adf-9e7c-3f64884716b3
Oct 9, 2026
Merged

boehlerlukas merged 1 commit into
masterfrom
kai-code/4dc7f75eadb0e18f71944376-36e00863-dbe0-4adf-9e7c-3f64884716b3

Conversation

@kai-by-gleap

@kai-by-gleap kai-by-gleap Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Automated changes by Kai Code.

The expanded messenger (max-width 690px, no height cap) was allowed on any viewport of 451px or more. On a phone with the page zoomed out just past the mobile breakpoint (e.g. a 571px-wide CSS viewport), the widget left the full-screen mobile layout, and a stored "expanded" choice made it calc(100% - 40px) wide and nearly full height, covering almost the whole page.

Expansion now needs a viewport of at least 768px (widgetExpandMinWidth in UI.js), used by both the expanded CSS media query and GleapFrameManager.canExpandWidget(), so they stay in sync. Narrower viewports show the default 410px widget, hide the expand button, and keep the stored preference for when the window gets wider again. Added tests for 571px, a fractional 767.5px, and the 768px boundary.

Gleap ticket #185052.

Gleap ticket: View in Gleap

The expanded messenger (max-width 690px, no height cap) was allowed on any viewport of 451px or more. On a phone with the page zoomed out just past the mobile breakpoint (e.g. a 571px-wide CSS viewport), the widget left the full-screen mobile layout, and a stored "expanded" choice made it `calc(100% - 40px)` wide and nearly full height, covering almost the whole page.

Expansion now needs a viewport of at least 768px (`widgetExpandMinWidth` in UI.js), used by both the expanded CSS media query and `GleapFrameManager.canExpandWidget()`, so they stay in sync. Narrower viewports show the default 410px widget, hide the expand button, and keep the stored preference for when the window gets wider again. Added tests for 571px, a fractional 767.5px, and the 768px boundary.

Gleap ticket #185052.
@boehlerlukas
boehlerlukas merged commit d0a487c into master Oct 9, 2026
1 check passed
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.

1 participant