Skip to content

Add touchPrivacyLevel, canHandle/fallback recorders, and subKeyForEle…#960

Draft
nguyexua wants to merge 1 commit intodevelopfrom
lan.nguyen/sr-recorder-infrastructure
Draft

Add touchPrivacyLevel, canHandle/fallback recorders, and subKeyForEle…#960
nguyexua wants to merge 1 commit intodevelopfrom
lan.nguyen/sr-recorder-infrastructure

Conversation

@nguyexua
Copy link

…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) 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

What 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

  • This pull request has appropriate unit and / or integration tests
  • This pull request references a Github or JIRA issue

…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
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.

1 participant