Determine recording size based on active window #4354
+230
−45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Instead of relying on the window metrics, we now determine the size based on the top level Window View, once determined the
RecordingConfig
is created and actual recording is started.I couldn't re-use the
onConfigurationChanged
hook, as it removes allrootViews
. But in case of Dialogs, the root views are stacked and as soon as the dialog is popped, no more root view would be available.I tried to apply my changes with minimal impact to the existing structure, happy to restructure it in a better way too, I simply wasn't sure how hybrids consume the existing APIs.
💡 Motivation and Context
Fixes #3574
Fixes #4358
💚 How did you test it?
Manual testing, see e.g. https://sentry-sdks.sentry.io/replays/f278df82391b4b30a7b1cb8b99b15578/?project=5428559&query=&referrer=%2Freplays%2F&statsPeriod=10m&yAxis=count%28%29
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps