feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Feat: Hide sensitive content in screenshot

Open JakesMD opened this issue 3 months ago • 0 comments

:scroll: Description

I added the ability to hide sensitive content in draw mode and in the screenshot itself.

Changes:

  • Created a FeedbackRedacted widget that blurs its child in draw mode and in the screenshot.
  • Created a FeedbackRedactionController to notify FeedbackRedacted widgets of changes to the redaction state.
  • Added a redaction controller to FeedbackController.
  • Added a redactionController.unredact() call to FeedbackController.hide().
  • Added the logic to FeedbackWidget to 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 FeedbackRedacted widget
  • Updated existing widget tests to also check for blurring depending on mode an so on.
  • Added a test to FeedbackController to check that unredact() is called during hide()
  • Added FeedbackRedactionController tests 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

JakesMD avatar Oct 03 '25 15:10 JakesMD