Commit a64a6aa
Pr private components in mechanism (#221)
* Add dist to .gitignore
* Add private components to mechanism
* Preface components inside mechanism
* Add tooltips
* Fix false warning for calling methods on components in mechanisms
* removed unused import
* Updated mechanism and robot module start json.
* Added comment specifying that it needs to call getAllComponentsFromMechanism so it can create the port parameters.
* Updated mrc_mechanism_component_holder.ts
Since the mrc_mechanism_component_holder block can't change once it has been
placed on the workspace, the code can be simplified.
* Updated mrc_call_python_function.ts to handle mechanism component methods.
The mechanismId (and mrcMechanismId) is set to the id of the mechanism so if the mechanism is renamed (in the robot), we update it.
Added mrcComponentNames and mrcMapComponentNameToId. These are filled in during mrcOnLoad and are used to populate the component name dropdown field.
* Set current version to 0.0.2.
Added privateComponents to module content.
We can use this to get the private components from a mechanism without having to
use a headless blockly workspace to process the blocks.
Added code to upgrade projects to version 0.0.2, which involves updating the
mrc_mechanism_component_holder block in the robot and adding privateComponents
in module content.
* Added code to editor to get the private components and pass them to
storageModuleContent.makeModuleContentText.
Made some methods private where possible.
Modified getAllComponentsFromMechanism so it gets the private components from a
mechanism's module content without having to use a headless blockly workspace to
process the mechanism's blocks.
* Added comment in getRobotMechanismsCategory specifying that it needs to call
getAllComponentsFromMechanism so it can create the port parameters.
Simplified getComponentsCategory to call getAllComponentsFromWorkspace for both robot and mechanism modules and added comments explaining why.
---------
Co-authored-by: Liz Looney <[email protected]>1 parent 93d41f0 commit a64a6aa
File tree
15 files changed
+507
-123
lines changed- src
- blocks
- editor
- i18n/locales
- en
- es
- he
- modules
- storage
- toolbox
15 files changed
+507
-123
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | | - | |
76 | | - | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
| |||
95 | 93 | | |
96 | 94 | | |
97 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
102 | | - | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
109 | | - | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
121 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
122 | 139 | | |
123 | 140 | | |
124 | 141 | | |
| |||
179 | 196 | | |
180 | 197 | | |
181 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
182 | 221 | | |
183 | 222 | | |
184 | 223 | | |
| |||
243 | 282 | | |
244 | 283 | | |
245 | 284 | | |
| 285 | + | |
246 | 286 | | |
247 | | - | |
248 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
249 | 290 | | |
250 | 291 | | |
251 | 292 | | |
| |||
266 | 307 | | |
267 | 308 | | |
268 | 309 | | |
269 | | - | |
| 310 | + | |
270 | 311 | | |
271 | 312 | | |
272 | 313 | | |
273 | 314 | | |
274 | 315 | | |
| 316 | + | |
275 | 317 | | |
276 | 318 | | |
277 | 319 | | |
| |||
284 | 326 | | |
285 | 327 | | |
286 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
287 | 343 | | |
288 | 344 | | |
289 | 345 | | |
| |||
305 | 361 | | |
306 | 362 | | |
307 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
308 | 378 | | |
309 | 379 | | |
310 | 380 | | |
| |||
330 | 400 | | |
331 | 401 | | |
332 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
333 | 422 | | |
334 | 423 | | |
335 | 424 | | |
| |||
340 | 429 | | |
341 | 430 | | |
342 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
256 | | - | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | | - | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
267 | | - | |
| 268 | + | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
| |||
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
276 | 294 | | |
277 | 295 | | |
278 | 296 | | |
279 | 297 | | |
280 | 298 | | |
281 | 299 | | |
282 | | - | |
| 300 | + | |
283 | 301 | | |
284 | 302 | | |
285 | 303 | | |
| |||
415 | 433 | | |
416 | 434 | | |
417 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
418 | 455 | | |
419 | 456 | | |
420 | 457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
0 commit comments