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

Do not play animated GIFs, stickers when Reduce Motion is on #5983

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

s0ph0s-dog
Copy link

First time contributor checklist

Contributor checklist

  • My commits are rebased on the latest main branch
  • My commits are in nice logical chunks
  • My contribution is fully baked and is ready to be merged as is
  • I have tested my contribution on these devices:
  • iPhone 14 Pro, iOS 18.3.1

Description

This fixes #5949 by:

  • Disabling autoplay for GIFs, animated images, and animated stickers when Reduce Motion is enabled
  • Changing the handleTap behavior for stickers to play/pause the animation when the sticker is animated and Reduce Motion is enabled
  • Adding a new “Show Sticker Pack” item to the context menu when long-pressing a sticker, so that it’s still possible to see the pack when Reduce motion is enabled
  • Adding play button icons on top of GIFs and animated stickers when Reduce Motion is enabled to indicate that tapping will play the animation

This also adds 2 new translation strings (for the “Show Sticker Pack” menu item). Unfortunately, I only know English, so that’s the only language I’ve added the translations to.

This is also my first contribution to the Signal codebase, so please let me know if I should’ve done something a different way! I tried to make my changes as minimally disruptive as possible, and I don’t know whether I’ve done that at the expense of following existing style/conventions.

This fixes signalapp#5949 by:
- Disabling autoplay for GIFs, animated images, and animated stickers when Reduce Motion is on
- Changing the `handleTap` behavior for stickers to play/pause the animation when the sticker is animated and Reduce Motion is on
- Adding a new “Show Sticker Pack” item to the context menu when long-pressing a sticker, so that it’s still possible to see the pack when Reduce motion is enabled
- Adding play button icons on top of GIFs and animated stickers to indicate that tapping will play the animation

This also adds 2 new translation strings (for the “Show Sticker Pack” menu item). Unfortunately, I only know English, so that’s the only language I’ve added the translations to.

This is also my first contribution to the Signal codebase, so please let me know if I should’ve done something a different way! I tried to make my changes as minimally disruptive as possible, and I don’t know whether I’ve done that at the expense of following existing style/conventions.
I discovered this while re-testing after merging in the recent changes. If Reduce Motion is *off*, opening a GIF would crash because the app couldn’t set up playback controls on the GIF player. This fix is starting to give me a whiff of code smell though, so I might need to refactor some of this…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

A11y: iOS Accessibility settings have no effect on animated gifs or Stickers in Signal chats
1 participant