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

FIX: mobile modal tweaks #27073

Merged
merged 1 commit into from
May 19, 2024
Merged

Conversation

jjaffeux
Copy link
Contributor

  • removes will-change: auto; which is a performance hack which should be avoided and is probably causing more harm than good here
  • lowers swipe velocity to 0.4 to ensure the modal can be dismissed with the thumb
  • uses JS CSS animate API to animate the backdrop opacity
  • uses the height of the modal container to have more precise values when computing backdrop opacity
  • animate the modal container instead of the wrapper
  • removes a useless template-lint-disable directive
  • simplify the closing animation
  • various small code tweaks to limit indirection

- removes `will-change: auto;` which is a performance hack which should be avoided and is probably causing more harm than good here
- lowers swipe velocity to 0.4 to ensure the modal can be dismissed with the thumb
- uses JS CSS animate API to animate the backdrop opacity
- uses the height of the modal container to have more precise values when computing backdrop opacity
- animate the modal container instead of the wrapper
- removes a useless template-lint-disable directive
- simplify the closing animation
- various small code tweaks to limit indirection
@jjaffeux jjaffeux requested a review from ZogStriP May 18, 2024 10:48
@jjaffeux jjaffeux merged commit f752851 into discourse:main May 19, 2024
16 checks passed
@jjaffeux jjaffeux deleted the mobile-modal-tweaks branch May 19, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants