Commit 04ec50e
authored
[DevTools] Add Filtering of Environment Names (#30850)
Stacked on #30842.
This adds a filter to be able to exclude Components from a certain
environment. Default to Client or Server.
The available options are computed into a dropdown based on the names
that are currently used on the page (or an option that were previously
used). In addition to the hardcoded "Client". Meaning that if you have
Server Components on the page you see "Server" or "Client" as possible
options but it can be anything if there are multiple RSC environments on
the page.
"Client" in this case means Function and Class Components in Fiber -
excluding built-ins.
If a Server Component has two environments (primary and secondary) then
both have to be filtered to exclude it.
We don't show the option at all if there are no Server Components used
in the page to avoid confusing existing users that are just using Client
Components and wouldn't know the difference between Server vs Client.
<img width="815" alt="Screenshot 2024-08-30 at 12 56 42 AM"
src="https://github.com/user-attachments/assets/e06b225a-e85d-4cdc-8707-d4630fede19e">1 parent 4f60494 commit 04ec50e
File tree
10 files changed
+253
-26
lines changed10 files changed
+253
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
287 | 300 | | |
288 | 301 | | |
289 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
814 | 815 | | |
815 | 816 | | |
816 | 817 | | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
817 | 836 | | |
818 | 837 | | |
819 | 838 | | |
| |||
Lines changed: 68 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
721 | 722 | | |
722 | 723 | | |
723 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
724 | 730 | | |
725 | 731 | | |
726 | 732 | | |
| |||
1099 | 1105 | | |
1100 | 1106 | | |
1101 | 1107 | | |
| 1108 | + | |
1102 | 1109 | | |
1103 | 1110 | | |
1104 | 1111 | | |
| |||
1108 | 1115 | | |
1109 | 1116 | | |
1110 | 1117 | | |
| 1118 | + | |
1111 | 1119 | | |
1112 | 1120 | | |
1113 | 1121 | | |
| |||
1133 | 1141 | | |
1134 | 1142 | | |
1135 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1136 | 1147 | | |
1137 | 1148 | | |
1138 | 1149 | | |
| |||
1215 | 1226 | | |
1216 | 1227 | | |
1217 | 1228 | | |
1218 | | - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1219 | 1237 | | |
1220 | 1238 | | |
1221 | 1239 | | |
| |||
1236 | 1254 | | |
1237 | 1255 | | |
1238 | 1256 | | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1239 | 1265 | | |
1240 | 1266 | | |
1241 | 1267 | | |
| |||
1294 | 1320 | | |
1295 | 1321 | | |
1296 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1297 | 1343 | | |
1298 | 1344 | | |
1299 | 1345 | | |
| |||
2489 | 2535 | | |
2490 | 2536 | | |
2491 | 2537 | | |
2492 | | - | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
2493 | 2546 | | |
2494 | 2547 | | |
2495 | 2548 | | |
| |||
2511 | 2564 | | |
2512 | 2565 | | |
2513 | 2566 | | |
2514 | | - | |
2515 | | - | |
2516 | | - | |
2517 | | - | |
2518 | 2567 | | |
2519 | 2568 | | |
2520 | 2569 | | |
| |||
2919 | 2968 | | |
2920 | 2969 | | |
2921 | 2970 | | |
2922 | | - | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
2923 | 2982 | | |
2924 | 2983 | | |
2925 | 2984 | | |
| |||
2983 | 3042 | | |
2984 | 3043 | | |
2985 | 3044 | | |
2986 | | - | |
2987 | | - | |
2988 | | - | |
2989 | | - | |
2990 | 3045 | | |
2991 | 3046 | | |
2992 | 3047 | | |
| |||
3925 | 3980 | | |
3926 | 3981 | | |
3927 | 3982 | | |
3928 | | - | |
| 3983 | + | |
3929 | 3984 | | |
3930 | 3985 | | |
3931 | 3986 | | |
| |||
5750 | 5805 | | |
5751 | 5806 | | |
5752 | 5807 | | |
| 5808 | + | |
5753 | 5809 | | |
5754 | 5810 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1081 | 1086 | | |
1082 | 1087 | | |
1083 | 1088 | | |
| |||
1152 | 1157 | | |
1153 | 1158 | | |
1154 | 1159 | | |
| 1160 | + | |
1155 | 1161 | | |
1156 | 1162 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
419 | 420 | | |
420 | 421 | | |
421 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| 241 | + | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| |||
0 commit comments