Add touchPrivacyLevel, canHandle/fallback recorders, and subKeyForEle…#960
Draft
Add touchPrivacyLevel, canHandle/fallback recorders, and subKeyForEle…#960
Conversation
…ment - Add `touchPrivacyLevel` to `TreeCapturePrivacy`; `performCapture` now discards pointer events unless the level is `show` - Add `canHandle(Widget)` default method to `ElementRecorder` to support generic widget types (e.g. Radio<T>) that can't match by exact runtimeType - Add `_fallbackRecorders` list and `_recorderFor()` to `SessionReplayRecorder` for O(1) type-map lookup with canHandle fallback - Add `subKeyForElement(element, subIndex)` to `KeyGenerator` for compound widgets that emit multiple wireframes from a single Element - Remove standalone `touchPrivacyLevel` constructor parameter from `SessionReplayRecorder`; propagate through `TreeCapturePrivacy` instead - Fix `PrivacyRecorder` to carry `touchPrivacyLevel` into subtree privacy - Add `createTestImage` helper to test_utils.dart - Update all tests and golden tests for new `TreeCapturePrivacy` API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…ment
touchPrivacyLeveltoTreeCapturePrivacy;performCapturenow discards pointer events unless the level isshowcanHandle(Widget)default method toElementRecorderto support generic widget types (e.g. Radio) that can't match by exact runtimeType_fallbackRecorderslist and_recorderFor()toSessionReplayRecorderfor O(1) type-map lookup with canHandle fallbacksubKeyForElement(element, subIndex)toKeyGeneratorfor compound widgets that emit multiple wireframes from a single ElementtouchPrivacyLevelconstructor parameter fromSessionReplayRecorder; propagate throughTreeCapturePrivacyinsteadPrivacyRecorderto carrytouchPrivacyLevelinto subtree privacycreateTestImagehelper to test_utils.dartTreeCapturePrivacyAPIWhat and why?
What changes does this pull request introduce and why is it necessary?
How?
If needed, a description of how this PR accomplishes what it does.
Review checklist