DataDog / dd-sdk-ios

Datadog SDK for iOS - Swift and Objective-C.
Apache License 2.0
219 stars 127 forks source link

RUM-6284 Implement Overrides Logic #2067

Closed mariedm closed 1 month ago

mariedm commented 1 month ago

What and why?

This PR builds on the work from #2058, which introduced Fine-Grained Masking (FGM) overrides (see the RFC [internal] for more details). It implements the logic for applying the text and input privacy override, as well as image privacy override, at the view level. The goal is to allow views to have a specific privacy setting that overrides the global configuration.

Additionally, it ensures that privacy overrides propagate to child views, allowing parents to enforce privacy settings for their entire subtree, unless explicitly overridden by child views.

How?

Review checklist

datadog-datadog-prod-us1[bot] commented 1 month ago

Datadog Report

Branch report: RUM-6284-implement-text-override-logic Commit report: cd68082 Test service: dd-sdk-ios

:white_check_mark: 0 Failed, 3507 Passed, 0 Skipped, 2m 18.97s Total Time :small_red_triangle_down: Test Sessions change in coverage: 2 decreased, 5 increased, 7 no change

:small_red_triangle_down: Code Coverage Decreases vs Default Branch (2)

mariedm commented 1 month ago

question/ Do we have an existing plan for adding coverage through snapshot tests? I think the FGM can vastly benefit from that level of integration testing, given the broad impact of this feature.

Yes, that's a good point! It's on my mind since the beginning. I'm planning to tackle this in a separate PR, once all the work on the logic itself is completed.