Commit graph

731 commits

Author SHA1 Message Date
Christopher Willis-Ford
7d5a780638 style: fix the other lint complaints 2023-12-15 17:40:25 -08:00
Christopher Willis-Ford
8dbcc1fc8f style: fix hasOwnProperty lint complaints 2023-12-15 17:40:05 -08:00
Christopher Willis-Ford
bd51da51eb
Revert "fix: disable metadata for now" 2023-10-03 12:41:03 -07:00
Christopher Willis-Ford
95912963ce fix: disable metadata for now 2023-10-02 18:18:34 -07:00
Christopher Willis-Ford
4a4dc1f3aa Merge branch 'develop' into use-scratch-fetch 2023-09-26 09:12:15 -07:00
Christopher Willis-Ford
4b02e41430 fix: remove use of 'globalThis' keyword 2023-08-07 14:07:12 -07:00
Christopher Willis-Ford
829ae1dfac fix: tell fetchWithTimeout to use scratchFetch from storage instance 2023-03-31 09:07:06 -07:00
Christopher Willis-Ford
e696e3548b fix: don't set run ID until storage exists (also add tests) 2023-03-31 09:07:06 -07:00
Christopher Willis-Ford
9fca9ee583 feat: use scratchFetch
BREAKING CHANGE: servers must accept new header x-projectid
2023-03-31 09:07:06 -07:00
Andy O'Neill
2581446907 feat: ability to clear flyout blocks when language changes 2022-12-14 11:03:12 -05:00
Christopher Willis-Ford
56dd49aaed fix(extensions): try harder to avoid Scratch Link init in non-browser environments
Prior to this change, the Scratch Link init would fail in JSDOM. That means it fails in the
scratch-gui integration tests, so that's no good...
2022-08-16 23:42:55 -07:00
Christopher Willis-Ford
2bdea9106d feat(extensions): support Scratch Link 2.0 browser extension
Right now this is only needed for Safari
2022-08-16 08:20:27 -07:00
Christopher Willis-Ford
840ffb5df0 test: don't use process.exit to end tests
Newer versions of `tap` run more asynchronously, so sometimes using `process.nextTick(process.exit)`
to end a test would prevent the test from completing correctly. Removing all instances of
`process.nextTick(process.exit)` put tests into three categories:
* the test still worked correctly -- no fixup needed.
* the test would hang because the VM's `_steppingInterval` was keeping
  Node alive. These tests call a new `quit()` method which ends the
  stepping interval.
* the `load-extensions` test needed special attention because the "Video
  Sensing" extension starts its own loop using `setTimeout`. I added a
  `_stopLoop()` method on the extension and directly call that from the
  test. I'm not completely happy with this solution but anything more
  general would likely require a change to the extension spec, so I'm
  leaving that as a followup task.
2022-06-07 11:44:06 -07:00
Eric Rosenbaum
0b4b32dcb0 Save and load the origin 2021-04-29 11:32:13 -04:00
DD Liu
e5560b067b Merge branch 'develop' into removev2SvgAdapter 2021-03-16 16:53:40 -04:00
DD Liu
627e62a339 Remove v2SvgAdapter 2021-03-04 15:32:14 -05:00
DD Liu
04b6963788 Pass on event type from CDM 2020-10-15 19:56:24 -04:00
Eric Rosenbaum
540d9c676c
Merge pull request #2341 from apple502j/patch-9
Clear some stats when disposing runtime
2020-06-22 10:25:41 -04:00
adroitwhiz
5462fe9966
Merge pull request #2442 from adroitwhiz/filter-extension-blocks
Support extension block filtering per-target
2020-06-16 16:01:51 -04:00
adroitwhiz
61a0739950 add comment on hideFromPalette 2020-06-02 16:29:49 -04:00
adroitwhiz
2373f9483e
Merge pull request #2441 from adroitwhiz/sensing-of-change-clear-cache
Reset blocks cache when sensing_of blocks are updated
2020-06-02 11:12:41 -04:00
adroitwhiz
d6e7ede03a Support extension block filtering per-target 2020-05-28 12:15:22 -04:00
adroitwhiz
3c0ae4ebbf Reset blocks cache when sensing_of blocks update 2020-05-28 11:24:05 -04:00
apple502j
4bd04e20e2
oops 2020-05-24 09:30:27 +09:00
apple502j
03db30d400 Update sensing_of fields if variable gets renamed
Thanks @adroitwhiz and @fsih for some advice!
2020-05-22 19:00:43 +09:00
adroitwhiz
3341489dfd Remove BlockCached._shadowOps 2020-05-12 15:30:20 -04:00
apple502j
3e48cd7df6 Reset counter and timer too 2020-04-06 20:21:31 +09:00
apple502j
8e46f1c037
Use correct name in changeBlock in renameVariable 2020-02-10 22:28:10 +09:00
Erik Mejer Hansen
a6d8f6cbf2 Fix indents 2019-11-13 15:00:38 +01:00
Erik Mejer Hansen
700e163abe Fix handling of custom field types 2019-11-13 14:58:44 +01:00
Karishma Chadha
0a5673d5d3
Merge pull request #2280 from kchadha/inline-images-in-extensions
Inline Images in Extensions
2019-10-18 10:20:16 -04:00
Karishma Chadha
3859013606 Move inline image specific code into separate helper function. Remove unnecessary todo. 2019-10-17 15:29:04 -04:00
Karishma Chadha
8bba60aaf3
Merge pull request #2196 from mzgoddard/develop-profiler
add Profiler.increment and Profiler.frame
2019-10-01 09:46:59 -05:00
Karishma Chadha
a9e081859e Remove todo comment about flip_rtl default based on discussion from PR. 2019-09-27 11:48:31 -05:00
Karishma Chadha
470fdb761d Remove 'alt' from field_image descriptor since it seems to only be used for 'collapsed blocks' from blockly. This is not a feature being used in scratch. Update docs. 2019-09-27 11:46:48 -05:00
Karishma Chadha
b1392572ca Update tests and fix bug causing type error. 2019-09-27 11:39:15 -05:00
Karishma Chadha
c5879633d5 Make ArgumentTypeMap clearer now that there is an image field which is not technically an argument. Make the color picker consistent with the other arguments so that an extension developer can specify a default color if they wish. Add docs to document this. 2019-09-27 11:04:03 -05:00
Karishma Chadha
6afbe192d8 Log a warning if dataURI property is missing from image argument specification in extension info. Default to empty string if dataURI or alt are not provided. 2019-09-20 16:56:02 -07:00
Karishma Chadha
167f502edc Add comment for flipRTL property. 2019-09-20 16:02:18 -07:00
Karishma Chadha
7129f8c4a9 Add support for specifying that whether or not the image should be flipped in an RTL language. 2019-09-20 15:47:33 -07:00
Karishma Chadha
21430a5366 Add support for image argument type in extensions. Add example in core example extension. 2019-09-20 15:19:14 -07:00
Karishma Chadha
c499106f85
Revert "Raise params to the next frame when pushing" 2019-07-22 12:59:48 -04:00
Karishma Chadha
9ba9732e8a
Merge pull request #2145 from mzgoddard/raise-params
Raise params to the next frame when pushing
2019-07-17 16:12:37 -04:00
Michael "Z" Goddard
d3ae00292f
add Profiler.increment and Profiler.frame
Let profiled code track frames and arguments called by incrementing a
counter for a frame id or frame id and argument. This replaces the same
counting by recording the call as part of a history of calls and
returns. Updating the array for all calls counted takes enough time to
bias the profiled run towards less overall executions.
2019-07-17 15:06:47 -04:00
Michael "Z" Goddard
50b55a489b
fix stopThisScript inside procedures 2019-07-17 15:02:44 -04:00
Karishma Chadha
aae7607e10 fix extension dropdown menu item conversion 2019-06-18 21:03:17 -07:00
Chris Willis-Ford
eba89d57d8 Merge branch 'develop' into non-droppable-extension-menus 2019-06-18 16:52:47 -07:00
Karishma Chadha
9af2e4c086
Merge pull request #2161 from LLK/e16n
Supporting VM changes for extensionification
2019-06-18 18:53:20 -04:00
Christopher Willis-Ford
fd776025e5 refactor _refreshExtensionPrimitives for clarity
The previous form made it harder to see that at most one extension
category is handled per call.
2019-06-18 15:08:03 -07:00
Chris Willis-Ford
edd6aafed0 call out capitalization change since it's important but easy to miss
Co-Authored-By: Karishma Chadha <kchadha@media.mit.edu>
2019-06-18 15:07:58 -07:00