Commit 04bd333
authored
feat: lazy load of the yaml library components (#1556)
## Description
Closes #1306
Contributes to Shopify/oasis-frontend#249
Removed the `populateComponentRefs` function call when setting the component library state. Also removed the `storeComponentsFromLibrary` function and its associated logic that was storing individual components in local storage.
## Related Issue and Pull requests
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [x] Improvement
- [x] Cleanup/Refactor
- [ ] Breaking change
- [ ] Documentation update
## Checklist
- [ ] I have tested this does not break current pipelines / runs functionality
- [ ] I have tested the changes on staging
## Screenshots (if applicable)
## Test Instructions
[Screen Recording 2025-12-15 at 4.42.24 PM.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.com/user-attachments/thumbnails/56c6fa34-3963-4dc9-828f-3a761dee6e2e.mov" />](https://app.graphite.com/user-attachments/video/56c6fa34-3963-4dc9-828f-3a761dee6e2e.mov)
1. Open Tangle in "Incokgnito" browser mode. Ensure no lib is available in Application / IndexedDB / components.
2. Create "New Pipeline".
3. Ensure, that Component Library is available almost instantly.
4. Ensure, that Components can be dropped on canvas.
5. Ensure, that you can open "Info" dialog from left panel.
In the video I manually removed "hydration" info (name, author, digest) from the "Quick start" folder to ensure, that Left panel can display "not loaded" libraries.
## Additional Comments
This change simplifies the component library loading process by removing unnecessary processing steps.1 parent 2d10327 commit 04bd333
File tree
4 files changed
+114
-56
lines changed- src
- providers/ComponentLibraryProvider
- services
4 files changed
+114
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | | - | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
| 17 | + | |
10 | 18 | | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| 22 | + | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
19 | | - | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
| |||
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
84 | 96 | | |
85 | 97 | | |
86 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
87 | 135 | | |
88 | 136 | | |
89 | 137 | | |
90 | 138 | | |
91 | 139 | | |
92 | 140 | | |
93 | 141 | | |
94 | | - | |
95 | 142 | | |
96 | 143 | | |
97 | | - | |
98 | 144 | | |
99 | 145 | | |
100 | 146 | | |
101 | 147 | | |
102 | 148 | | |
103 | 149 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 150 | | |
110 | 151 | | |
111 | 152 | | |
| |||
121 | 162 | | |
122 | 163 | | |
123 | 164 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 165 | | |
129 | 166 | | |
130 | 167 | | |
| |||
166 | 203 | | |
167 | 204 | | |
168 | 205 | | |
169 | | - | |
| 206 | + | |
170 | 207 | | |
171 | 208 | | |
172 | 209 | | |
| |||
Lines changed: 49 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
226 | 265 | | |
227 | 266 | | |
228 | 267 | | |
229 | 268 | | |
230 | 269 | | |
231 | 270 | | |
232 | 271 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 272 | + | |
| 273 | + | |
236 | 274 | | |
237 | | - | |
| 275 | + | |
238 | 276 | | |
239 | 277 | | |
240 | 278 | | |
| |||
571 | 609 | | |
572 | 610 | | |
573 | 611 | | |
574 | | - | |
575 | | - | |
576 | | - | |
| 612 | + | |
577 | 613 | | |
578 | 614 | | |
579 | 615 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 117 | | |
146 | 118 | | |
147 | 119 | | |
| |||
0 commit comments