Skip to content

fix: mask sizing on scaling transform widget children#2520

Merged
vaind merged 2 commits into
mainfrom
fix/replay-sizing-transform-children
Dec 20, 2024
Merged

fix: mask sizing on scaling transform widget children#2520
vaind merged 2 commits into
mainfrom
fix/replay-sizing-transform-children

Conversation

@vaind

@vaind vaind commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

📜 Description

While testing, I've found a situation when there's a Transform applied on a widget tree. This would cause the size to be reported smaller than it actually renders on screen(shot). This PR changes how we calculate the bounding box to fix the issue.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • 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

@github-actions

Copy link
Copy Markdown
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

@codecov

codecov Bot commented Dec 19, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.59%. Comparing base (bcc4595) to head (eb0ebff).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2520      +/-   ##
==========================================
+ Coverage   87.01%   91.59%   +4.57%     
==========================================
  Files         265       88     -177     
  Lines        9426     3080    -6346     
==========================================
- Hits         8202     2821    -5381     
+ Misses       1224      259     -965     

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

@vaind
vaind marked this pull request as ready for review December 19, 2024 09:06
@github-actions

Copy link
Copy Markdown
Contributor

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1242.02 ms 1264.84 ms 22.82 ms
Size 8.42 MiB 9.87 MiB 1.44 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6d50a9b 1225.69 ms 1233.94 ms 8.25 ms
33d0587 1262.16 ms 1270.50 ms 8.34 ms
9f05645 1236.65 ms 1253.11 ms 16.45 ms
7f75f32 1230.80 ms 1251.79 ms 20.99 ms
7f2b01d 1253.92 ms 1266.70 ms 12.78 ms
2b9937e 1226.27 ms 1265.18 ms 38.91 ms
a1a1545 1270.85 ms 1289.82 ms 18.96 ms
4656f10 1247.04 ms 1276.16 ms 29.12 ms
8d64376 1260.92 ms 1289.32 ms 28.40 ms
280ab9f 1255.71 ms 1262.78 ms 7.06 ms

App size

Revision Plain With Sentry Diff
6d50a9b 8.38 MiB 9.74 MiB 1.36 MiB
33d0587 8.29 MiB 9.38 MiB 1.09 MiB
9f05645 8.28 MiB 9.34 MiB 1.06 MiB
7f75f32 8.28 MiB 9.33 MiB 1.05 MiB
7f2b01d 8.16 MiB 9.16 MiB 1.00 MiB
2b9937e 8.38 MiB 9.78 MiB 1.40 MiB
a1a1545 8.16 MiB 9.17 MiB 1.01 MiB
4656f10 8.32 MiB 9.50 MiB 1.19 MiB
8d64376 8.16 MiB 9.17 MiB 1.01 MiB
280ab9f 8.29 MiB 9.39 MiB 1.10 MiB

@buenaflor buenaflor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@vaind
vaind merged commit 1cc9547 into main Dec 20, 2024
@vaind
vaind deleted the fix/replay-sizing-transform-children branch December 20, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants