Commit 1372064
authored
feat: ignore masking (#80)
- ldIgnore() method to turn off masking for a whole tree
- fix issue when ldUnmask() could make view untappable in SwiftUI
- fix unmaskAccessibilityIdentifiers
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduce ignore and unmask controls across API and masking engine,
add SwiftUI/UIView helpers, and update sample usage.
>
> - **API / Associated Objects**:
> - Replace `swiftUIKey` with `ignoreUIViewKey`; add `ignoreUIView(_:)`
and `shouldIgnoreUIView(_:)`.
> - **SwiftUI Modifier**:
> - `SessionReplayModifier`/`SessionReplayViewRepresentable` now accept
optional `isEnabled` and `isIgnored`; set `maskUIView`/`ignoreUIView`
accordingly.
> - **Options**:
> - `PrivacyOptions`: add `unmaskUIViews` and
`unmaskAccessibilityIdentifiers`; keep `ignoreUIViews` and mask lists.
> - **Masking Engine (`MaskCollector`)**:
> - New `Settings.shouldIgnore(_:)` to skip views via associated flag,
class, or accessibility id.
> - `shouldMask(_:)` updated to respect unmask by associated flag,
class, and accessibility id; use class-based `maskUIViews`; remove
SwiftUI-specific mask check.
> - **Public Helpers**:
> - Add `View.ldMask()` and `View.ldIgnore()`; update
`ldPrivate`/`ldUnmask` to new modifier; add `UIView.ldIgnore()`.
> - **Test App**:
> - Switch to production mobile key; extend masked accessibility ids;
apply `.ldIgnore()` to `SmoothieRow`/list items; minor layout tweak in
number grid.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1d4d2f5. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 6d1cd15 commit 1372064
File tree
10 files changed
+128
-66
lines changed- Sources/LaunchDarklySessionReplay
- API
- ScreenCapture
- TestApp/Sources
- SessionReplay/NumberPad
10 files changed
+128
-66
lines changedLines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | | - | |
| 22 | + | |
18 | 23 | | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
10 | | - | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| |||
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
21 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
22 | 38 | | |
Lines changed: 58 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
38 | 66 | | |
39 | 67 | | |
40 | | - | |
| 68 | + | |
41 | 69 | | |
42 | 70 | | |
43 | 71 | | |
44 | 72 | | |
45 | | - | |
| 73 | + | |
46 | 74 | | |
47 | 75 | | |
48 | | - | |
| 76 | + | |
49 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
50 | 83 | | |
51 | 84 | | |
52 | 85 | | |
| |||
83 | 116 | | |
84 | 117 | | |
85 | 118 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 119 | + | |
91 | 120 | | |
92 | 121 | | |
93 | 122 | | |
94 | 123 | | |
95 | 124 | | |
96 | 125 | | |
97 | 126 | | |
98 | | - | |
99 | | - | |
| 127 | + | |
| 128 | + | |
100 | 129 | | |
101 | 130 | | |
102 | | - | |
| 131 | + | |
103 | 132 | | |
104 | 133 | | |
105 | 134 | | |
| |||
118 | 147 | | |
119 | 148 | | |
120 | 149 | | |
121 | | - | |
| 150 | + | |
| 151 | + | |
122 | 152 | | |
| 153 | + | |
123 | 154 | | |
124 | 155 | | |
125 | 156 | | |
126 | | - | |
| 157 | + | |
127 | 158 | | |
128 | | - | |
| 159 | + | |
129 | 160 | | |
130 | 161 | | |
131 | 162 | | |
132 | 163 | | |
133 | 164 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
139 | 168 | | |
140 | | - | |
| 169 | + | |
141 | 170 | | |
142 | 171 | | |
143 | 172 | | |
| |||
153 | 182 | | |
154 | 183 | | |
155 | 184 | | |
156 | | - | |
| 185 | + | |
157 | 186 | | |
158 | 187 | | |
159 | 188 | | |
160 | | - | |
161 | | - | |
| 189 | + | |
162 | 190 | | |
163 | 191 | | |
164 | | - | |
165 | | - | |
| 192 | + | |
166 | 193 | | |
167 | 194 | | |
168 | 195 | | |
| |||
176 | 203 | | |
177 | 204 | | |
178 | 205 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 206 | + | |
| 207 | + | |
183 | 208 | | |
184 | 209 | | |
185 | 210 | | |
| |||
193 | 218 | | |
194 | 219 | | |
195 | 220 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | 221 | | |
213 | 222 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments