Skip to content

chore(feedback): Improve widget animations #4555

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 3 commits into from
Feb 17, 2025

Conversation

krystofwoldrich
Copy link
Member

This PR removes duplicate animations of the feedback widget.

Because modal slide and animated slide, the modal would flash in an upper position when sliding out, see the video below.

before.mov

After the changes, the widget plays only one slide animation and slides once. Als,o the background opacity, animates now on close. Before was canceled by unmounting the widget.

Behaviour change

if onClose or onSucess callbacks are supplied the widget doesn't unmount users get to decide what to do with the widget. This allows us in case of the auto-injection keep the form on the modal which is sliding out instead of sliding out a blank modal.

after.mov

Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Improve widget animations ([#4555](https://github.com/getsentry/sentry-react-native/pull/4555))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 20d0659

Copy link
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 370.74 ms 403.21 ms 32.47 ms
Size 17.75 MiB 20.12 MiB 2.38 MiB

Baseline results on branch: feedback-ui

Startup times

Revision Plain With Sentry Diff
8cb898b 438.83 ms 420.58 ms -18.25 ms
e5d5735 452.70 ms 453.04 ms 0.34 ms
2646c98 429.98 ms 421.63 ms -8.35 ms
894ebb0 497.45 ms 545.04 ms 47.60 ms
0459aee 491.48 ms 486.13 ms -5.35 ms
3e4cdf5 462.35 ms 474.96 ms 12.61 ms
0325426 477.32 ms 457.43 ms -19.89 ms
269c976 448.08 ms 428.86 ms -19.22 ms
77e88fc 478.48 ms 487.21 ms 8.73 ms
df05370 477.62 ms 491.63 ms 14.00 ms

App size

Revision Plain With Sentry Diff
8cb898b 17.75 MiB 20.12 MiB 2.37 MiB
e5d5735 17.75 MiB 20.12 MiB 2.37 MiB
2646c98 17.75 MiB 20.12 MiB 2.37 MiB
894ebb0 17.75 MiB 20.12 MiB 2.37 MiB
0459aee 17.75 MiB 20.12 MiB 2.37 MiB
3e4cdf5 17.75 MiB 20.12 MiB 2.37 MiB
0325426 17.75 MiB 20.12 MiB 2.37 MiB
269c976 17.75 MiB 20.12 MiB 2.37 MiB
77e88fc 17.75 MiB 20.12 MiB 2.37 MiB
df05370 17.75 MiB 20.12 MiB 2.37 MiB

Copy link
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 344.92 ms 342.26 ms -2.66 ms
Size 7.15 MiB 8.39 MiB 1.24 MiB

Baseline results on branch: feedback-ui

Startup times

Revision Plain With Sentry Diff
3e4cdf5+dirty 642.13 ms 702.23 ms 60.10 ms
e42816c+dirty 347.06 ms 348.18 ms 1.12 ms
e5d5735+dirty 377.37 ms 430.04 ms 52.67 ms
77e88fc+dirty 358.67 ms 346.20 ms -12.47 ms
6b1624f+dirty 382.17 ms 441.00 ms 58.83 ms
df05370+dirty 395.08 ms 430.38 ms 35.30 ms
269c976+dirty 395.13 ms 438.37 ms 43.24 ms
8cb898b+dirty 393.33 ms 416.20 ms 22.87 ms
9402883+dirty 436.49 ms 518.94 ms 82.45 ms
0459aee+dirty 424.10 ms 466.63 ms 42.53 ms

App size

Revision Plain With Sentry Diff
3e4cdf5+dirty 7.15 MiB 8.39 MiB 1.23 MiB
e42816c+dirty 7.15 MiB 8.39 MiB 1.24 MiB
e5d5735+dirty 7.15 MiB 8.39 MiB 1.23 MiB
77e88fc+dirty 7.15 MiB 8.39 MiB 1.24 MiB
6b1624f+dirty 7.15 MiB 8.39 MiB 1.23 MiB
df05370+dirty 7.15 MiB 8.39 MiB 1.23 MiB
269c976+dirty 7.15 MiB 8.39 MiB 1.23 MiB
8cb898b+dirty 7.15 MiB 8.39 MiB 1.24 MiB
9402883+dirty 7.15 MiB 8.39 MiB 1.23 MiB
0459aee+dirty 7.15 MiB 8.38 MiB 1.23 MiB

Copy link
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1205.09 ms 1212.96 ms 7.87 ms
Size 2.63 MiB 3.75 MiB 1.12 MiB

Baseline results on branch: feedback-ui

Startup times

Revision Plain With Sentry Diff
0325426+dirty 1228.88 ms 1229.92 ms 1.04 ms
e42816c+dirty 1211.29 ms 1219.65 ms 8.37 ms
8cb898b+dirty 1221.40 ms 1231.78 ms 10.37 ms
6b1624f+dirty 1224.65 ms 1225.65 ms 1.00 ms
0459aee+dirty 1232.82 ms 1231.19 ms -1.63 ms
2646c98+dirty 1218.51 ms 1218.92 ms 0.41 ms
e5d5735+dirty 1222.02 ms 1222.22 ms 0.20 ms
df05370+dirty 1209.92 ms 1216.55 ms 6.63 ms
269c976+dirty 1210.02 ms 1204.46 ms -5.56 ms
3e4cdf5+dirty 1222.53 ms 1224.42 ms 1.89 ms

App size

Revision Plain With Sentry Diff
0325426+dirty 2.63 MiB 3.69 MiB 1.06 MiB
e42816c+dirty 2.63 MiB 3.75 MiB 1.12 MiB
8cb898b+dirty 2.63 MiB 3.71 MiB 1.08 MiB
6b1624f+dirty 2.63 MiB 3.71 MiB 1.07 MiB
0459aee+dirty 2.63 MiB 3.69 MiB 1.06 MiB
2646c98+dirty 2.63 MiB 3.69 MiB 1.06 MiB
e5d5735+dirty 2.63 MiB 3.69 MiB 1.06 MiB
df05370+dirty 2.63 MiB 3.71 MiB 1.07 MiB
269c976+dirty 2.63 MiB 3.69 MiB 1.06 MiB
3e4cdf5+dirty 2.63 MiB 3.69 MiB 1.06 MiB

Copy link
Collaborator

@antonis antonis left a comment

Choose a reason for hiding this comment

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

thank you for fixing this @krystofwoldrich 🙇
The code changes LGMT and I didn't notice any side effects on my tests on Android or iOS 🚀

Copy link
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1227.72 ms 1240.63 ms 12.92 ms
Size 3.19 MiB 4.32 MiB 1.14 MiB

Baseline results on branch: feedback-ui

Startup times

Revision Plain With Sentry Diff
0325426+dirty 1210.17 ms 1216.37 ms 6.20 ms
e42816c+dirty 1220.08 ms 1222.46 ms 2.38 ms
8cb898b+dirty 1209.39 ms 1207.57 ms -1.82 ms
6b1624f+dirty 1224.12 ms 1220.73 ms -3.39 ms
0459aee+dirty 1233.67 ms 1239.80 ms 6.12 ms
2646c98+dirty 1239.94 ms 1246.90 ms 6.96 ms
e5d5735+dirty 1217.78 ms 1221.80 ms 4.02 ms
df05370+dirty 1221.14 ms 1216.60 ms -4.55 ms
269c976+dirty 1223.29 ms 1222.90 ms -0.39 ms
3e4cdf5+dirty 1213.36 ms 1221.31 ms 7.95 ms

App size

Revision Plain With Sentry Diff
0325426+dirty 3.19 MiB 4.26 MiB 1.07 MiB
e42816c+dirty 3.19 MiB 4.32 MiB 1.13 MiB
8cb898b+dirty 3.19 MiB 4.28 MiB 1.09 MiB
6b1624f+dirty 3.19 MiB 4.27 MiB 1.09 MiB
0459aee+dirty 3.19 MiB 4.26 MiB 1.07 MiB
2646c98+dirty 3.19 MiB 4.26 MiB 1.07 MiB
e5d5735+dirty 3.19 MiB 4.26 MiB 1.07 MiB
df05370+dirty 3.19 MiB 4.27 MiB 1.09 MiB
269c976+dirty 3.19 MiB 4.26 MiB 1.07 MiB
3e4cdf5+dirty 3.19 MiB 4.26 MiB 1.07 MiB

@antonis antonis merged commit 2135c96 into feedback-ui Feb 17, 2025
65 of 67 checks passed
@antonis antonis deleted the kw/impove-slide-animation branch February 17, 2025 15:17
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.

2 participants