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: masking semi-transparent widgets #2472

Merged
merged 5 commits into from
Dec 10, 2024
Merged

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented Dec 10, 2024

📜 Description

  • fixes masking semi-transparent widgets (originally the mask would also be semi-transparent).
  • improves color-matching for text that doesn't have a color specified directly

💡 Motivation and Context

closes #2454

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes -- no, see Image-based masking tests #2473
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • flutter/lib/src/screenshot/recorder.dart
  • flutter/lib/src/screenshot/widget_filter.dart

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 71.15385% with 15 lines in your changes missing coverage. Please review.

Project coverage is 91.38%. Comparing base (7045efc) to head (4ea9a1d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
flutter/lib/src/screenshot/recorder.dart 56.66% 13 Missing ⚠️
flutter/lib/src/screenshot/widget_filter.dart 90.90% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2472      +/-   ##
==========================================
+ Coverage   84.23%   91.38%   +7.15%     
==========================================
  Files         181       87      -94     
  Lines        6514     3031    -3483     
==========================================
- Hits         5487     2770    -2717     
+ Misses       1027      261     -766     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 10, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 469.14 ms 489.54 ms 20.40 ms
Size 6.49 MiB 7.57 MiB 1.08 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
64af39c 386.80 ms 471.11 ms 84.31 ms
1d47eb7 282.26 ms 342.52 ms 60.26 ms
b728df4 390.98 ms 445.81 ms 54.83 ms
7273303 415.33 ms 491.51 ms 76.18 ms
50bdfad 395.22 ms 461.21 ms 65.98 ms
13f8952 459.41 ms 500.16 ms 40.76 ms
559d28f 302.35 ms 339.53 ms 37.18 ms
04db237 330.16 ms 428.38 ms 98.22 ms
ef2f368 350.06 ms 429.44 ms 79.38 ms
bffc2c5 348.00 ms 399.89 ms 51.89 ms

App size

Revision Plain With Sentry Diff
64af39c 6.27 MiB 7.20 MiB 958.83 KiB
1d47eb7 6.16 MiB 7.14 MiB 1010.29 KiB
b728df4 5.94 MiB 6.95 MiB 1.01 MiB
7273303 6.34 MiB 7.29 MiB 970.36 KiB
50bdfad 6.33 MiB 7.30 MiB 987.47 KiB
13f8952 6.49 MiB 7.56 MiB 1.08 MiB
559d28f 5.94 MiB 6.92 MiB 1001.70 KiB
04db237 5.94 MiB 6.95 MiB 1.01 MiB
ef2f368 5.94 MiB 6.89 MiB 975.81 KiB
bffc2c5 6.34 MiB 7.28 MiB 966.31 KiB

Previous results on branch: fix/masking-semitransparent-widgets

Startup times

Revision Plain With Sentry Diff
96f3545 491.15 ms 553.60 ms 62.45 ms

App size

Revision Plain With Sentry Diff
96f3545 6.49 MiB 7.57 MiB 1.08 MiB

Copy link
Contributor

github-actions bot commented Dec 10, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1236.00 ms 1266.96 ms 30.96 ms
Size 8.38 MiB 9.78 MiB 1.40 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8a10ab7 1226.49 ms 1250.52 ms 24.03 ms
0be962b 1264.10 ms 1281.16 ms 17.06 ms
ef2f368 1259.12 ms 1277.04 ms 17.92 ms
7ec9238 1259.69 ms 1281.59 ms 21.90 ms
89ea268 1252.33 ms 1253.58 ms 1.26 ms
6e083bb 1244.33 ms 1264.60 ms 20.26 ms
1bbb79f 1242.17 ms 1264.39 ms 22.21 ms
dd933d4 1238.73 ms 1252.43 ms 13.70 ms
e3d9076 1203.68 ms 1230.65 ms 26.97 ms
a094100 1260.27 ms 1276.75 ms 16.48 ms

App size

Revision Plain With Sentry Diff
8a10ab7 8.28 MiB 9.34 MiB 1.06 MiB
0be962b 8.10 MiB 9.16 MiB 1.07 MiB
ef2f368 8.15 MiB 9.10 MiB 965.24 KiB
7ec9238 8.34 MiB 9.65 MiB 1.31 MiB
89ea268 8.09 MiB 9.16 MiB 1.06 MiB
6e083bb 8.16 MiB 9.17 MiB 1.01 MiB
1bbb79f 8.38 MiB 9.78 MiB 1.40 MiB
dd933d4 8.33 MiB 9.64 MiB 1.31 MiB
e3d9076 8.33 MiB 9.40 MiB 1.07 MiB
a094100 8.16 MiB 9.17 MiB 1.01 MiB

Previous results on branch: fix/masking-semitransparent-widgets

Startup times

Revision Plain With Sentry Diff
96f3545 1241.27 ms 1268.43 ms 27.16 ms

App size

Revision Plain With Sentry Diff
96f3545 8.38 MiB 9.78 MiB 1.40 MiB

Copy link
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

👍

});

if (result == null) {
int limit = 20;
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume 20 is an arbitrary number right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, completely

@vaind vaind merged commit c3d30f4 into main Dec 10, 2024
58 checks passed
@vaind vaind deleted the fix/masking-semitransparent-widgets branch December 10, 2024 11:29
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.

Text is not masked when text is dynamic
2 participants