feedback
feedback copied to clipboard
Feat: Hide sensitive content in screenshot
:scroll: Description
I added the ability to hide sensitive content in draw mode and in the screenshot itself.
Changes:
- Created a
FeedbackRedactedwidget that blurs its child in draw mode and in the screenshot. - Created a
FeedbackRedactionControllerto notifyFeedbackRedactedwidgets of changes to the redaction state. - Added a redaction controller to
FeedbackController. - Added a
redactionController.unredact()call toFeedbackController.hide(). - Added the logic to
FeedbackWidgetto redact and unredact depending on the mode and whether a screenshot is being taken. - Updated README.md
:bulb: Motivation and Context
Helps devs comply with privacy regulations.
The option to detect for SensitiveContent widgets was explored, but it's practically impossible to accurately find out whether a SensitiveContent widget is visible or even just partially obscured (see https://github.com/ueman/feedback/issues/378#issuecomment-3365456803).
Fixes #378
:green_heart: How did you test it?
- Wrapped the counter text in the test app with a
FeedbackRedactedwidget - Updated existing widget tests to also check for blurring depending on mode an so on.
- Added a test to
FeedbackControllerto check thatunredact()is called duringhide() - Added
FeedbackRedactionControllertests to check that it's notifying listeners.
:pencil: Checklist
- [x] I reviewed submitted code
- [x] I added tests to verify changes
- [x] I updated the docs if needed
- [x] All tests passing except the ones that were already failing
- [x] No breaking changes