This repository was archived by the owner on Sep 21, 2021. It is now read-only.
Commit a57f3e5
committed
Don't add root actors to the state of the ObjectInspector.
The actors property on the ObjectInspector state keep track of all the actors that need to be
released when we're done with the component. The problem of releasing the root actor is that
if the comsumer of the OI was simply hidden, and then shown again, the user would not be
able to expand the objectInspector.
Here we don't track root actors so the consumer handle the lifetime of the root actors it handles.
This causes no issues for non-root actors, since the ObjectInspector is unmounted, if the user
want to expand it again after a hide/show cycle again, we'll end up creating new ObjectClient (and
actors thus).1 parent 109624c commit a57f3e5
File tree
4 files changed
+52
-7
lines changed- packages/devtools-reps/src/object-inspector
- tests/component
- __snapshots__
4 files changed
+52
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
320 | 327 | | |
321 | 328 | | |
322 | 329 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
| |||
104 | 116 | | |
105 | 117 | | |
106 | 118 | | |
| 119 | + | |
107 | 120 | | |
108 | | - | |
| 121 | + | |
109 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
110 | 141 | | |
111 | 142 | | |
112 | 143 | | |
| |||
143 | 174 | | |
144 | 175 | | |
145 | 176 | | |
146 | | - | |
| 177 | + | |
| 178 | + | |
147 | 179 | | |
148 | 180 | | |
149 | 181 | | |
| |||
0 commit comments