Skip to content

Change window resize handler to switch to/from mobile layout as soon as needed - #11656

Merged
Gargron merged 1 commit into
mastodon:masterfrom
ClearlyClaire:fixes/layout-change-reactivity
Aug 25, 2019
Merged

Gargron merged 1 commit into
mastodon:masterfrom
ClearlyClaire:fixes/layout-change-reactivity

Conversation

@ClearlyClaire

Copy link
Copy Markdown
Contributor

Until this PR, window resizing events were handled half a second after the last resizing event, which makes the UI feels laggy when changing screen orientation are reducing the window size.

As it is unlikely that a string of resize events will cross the mobile threshold repeatedly, apply layout changes as soon as crossing that threshold, and otherwise keep delaying height cache clearing to half a second after the last resizing event.

@ykzts ykzts left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected '!==' and instead saw '!='.

Comment thread app/javascript/mastodon/features/ui/index.js Outdated
@ClearlyClaire
ClearlyClaire force-pushed the fixes/layout-change-reactivity branch from 61aa870 to 1970b17 Compare August 25, 2019 10:20
@Gargron
Gargron merged commit bd4099d into mastodon:master Aug 25, 2019
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
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.

3 participants