Christopher Allen
335ff199d7
refactor: Update uncompiled-mode dependency loading for playground, tests ( #5715 )
...
* chore: rename module Blockly.blocks.Lists to ....lists
All the other Blockly.blocks modules have lower-case names. This
one being named with an upper-case initial appears to have been a
typo on my part.
This module name is not mentioned anywhere else in the source code
(though it will be soon!) so no other files need to be edited.
Further, it does not appear anywhere in the last release (which
before PR #5696 ) so it is not necessary to add an entry in
renamings.js for this change.
* chore(build): Rationalise deps.js, deps.mocha.js
* Include blocks/*.js (Blockly.blocks.*) in tests/deps.js, since
these modules are used in the playground. (They are goog.provide
modules loaded via <script> tags, so their absence from deps.js
does not cause errors - but it will when they are migrated to
goog.module and must be loaded via goog.require.)
* Filter the entries in deps.mocha.js so that it includes only the
additional mocha test modules (i.e. those not mentioned in deps.js
already).
* refactor: Load blocks and generators using goog.require
2021-11-17 00:04:45 +00:00
Maribeth Bottorff
ad57942efa
fix: Fix JS Spaghetti button. ( #5569 )
2021-09-30 13:22:27 -07:00
Beka Westberg
a4d84e57f8
fix: dragging blocks from the flyout that only have XML hooks ( #5422 )
...
* fix: positioning of flyout blocks
* fix: move flyout to JSON system
* cleanup: remove test code from playground
2021-09-20 13:08:35 -07:00
Beka Westberg
410365f4a1
feat: add support for defining toolboxes using pure json ( #5392 )
...
* feat: add recycling to core
* feat: add support for json block definitions in flyout
* tests: reorganize tests
* tests: add tests for generating contents
* Fixup reycling
* tests: add tests for recycling
* fix: types
* fix: lint
* fix: PR comments
* fix: creating blocks from flyout
* test: add test block to playground
* fix: types
* feat: add support for enabled
2021-09-20 13:08:35 -07:00
Beka Westberg
bd77b4ad3d
fix: touch up some deserialization behavior ( #5181 )
...
* Add parameter for recording undo.
This sets up the most common default behavior, but also makes it clear
to people that it is happening, because it might not be expected.
* Add grouping of events
* Add text width caching
* Add disabling workspace resizing
* Add performance optimizations
* Respect nulls from blocks.save
* Cleanup from rebase
* PR Comments
* Cleanup from rebase
2021-09-20 13:08:35 -07:00
Beka Westberg
9138bca93c
feat: add initialization of blocks and event firing ( #5166 )
...
* Change playground to use JSO system
* Add tests for initialization and events
* Add initialization of blocks
* PR Comments
2021-09-20 13:08:35 -07:00
kozbial
beff5e19bf
Combine workspace_comment_render_svg.js with workspace_comment_svg.js
2021-07-29 17:03:52 -07:00
Christopher Allen
1306e41d3b
Load playground.html etc. from local http server
...
Unlike goog.provide packages, goog.module modules are loaded using
XMLHttpRequest in uncompiled mode. Because browsers treat file: URLs
as each being a separate, unique origin, this means that CORS rules
prevent goog.module modules being loaded from a file URL.
To work around this, use the http-server npm to serve the repository
root directory on localhost:8080.
Provide a script so that you can type `npm start` to start the local
http server and automatically open a browser window pointing at
tests/playground.html.
Modify the setBackgroundColour function in the playgrounds to provide
the usual lilac background on locahost URLs and a sickly green one
if using a file: URL, all of which will soon stop working.
(The background doesn't actually appear to be visible in the advanced
playground.)
2021-07-09 23:11:19 +01:00
Sam El-Husseini
70f71af933
Add test-blocks into the basic playground ( #4333 )
...
* Use local node_modules files instead of unkpkg for advanced playground, get test blocks in the basic playground from npm
* Also move theme-modern
* Update package-lock
2020-10-02 09:48:01 -07:00
Sam El-Husseini
5d43d256e2
Move test blocks to dev-tools, refactor advanced playground ( #4057 )
...
* Remove remaining advanced playground actions, and remove test blocks
2020-07-24 13:53:00 -07:00
Monica Kozbial
64488c1402
Add listener for flyout events to playground. ( #4035 )
...
* Update workspace click and add listener for flyout events to playground.
* Fix test.
* Fix typing error
* change variable
* Update variable.
2020-07-20 14:00:03 -07:00
Sam El-Husseini
2276b67968
PR comments
2020-06-08 12:05:37 -07:00
Sam El-Husseini
e96ec4489c
Update the advanced playground to include the new Blockly playground
2020-06-08 09:53:45 -07:00
alschmiedt
55a36ba364
Add JSON definition for test blocks ( #3901 )
...
* Add JSON definition for test blocks
2020-05-15 13:50:12 -07:00
alschmiedt
dfad1dfebd
Remove populateTheme ( #3900 )
2020-05-14 10:28:20 -07:00
Rachel Fenichel
e6524a566d
Create advanced playground; simplify basic playground
2020-05-06 14:23:40 -07:00
Beka Westberg
bcfde92afb
Fix setValue not handling block disposal ( #3766 )
2020-04-06 09:59:30 -07:00
Sam El-Husseini
21763b7e00
Support enabling start hats from themes ( #3722 )
...
* Support themes configuring the start hats of blocks. Add test themes
2020-03-05 17:34:31 -08:00
Sam El-Husseini
8c5c33902b
Flash on render ( #3721 )
...
* Flash a block when it's renderered in debug mode
2020-03-05 13:26:10 -08:00
Beka Westberg
ec8d76f143
Add workspace comment context menu option to playground ( #3708 )
...
* Add WScomment context menu option to playground
2020-02-25 14:32:51 -08:00
Sam El-Husseini
eb40ca44ba
Dynamic fonts ( #3698 )
...
* Piping themes into the renderer and ensuring fields update their size information when constants change.
2020-02-20 17:16:01 -08:00
Sam El-Husseini
f6b5e9ebb4
Add test block for field image with a click handler ( #3642 )
2020-01-23 16:19:24 -08:00
Sam El-Husseini
f0f1681253
Cleanup connection test blocks in playground ( #3588 )
...
* Move connection test blocks handlers into test_blocks file out of the playground.
2020-01-14 09:02:57 -08:00
Beka Westberg
1278cd95ea
test: Added connection test blocks. ( #3525 )
...
* test: Added connection test blocks.
2020-01-13 15:51:42 -08:00
Sam El-Husseini
55997784ca
Move blockStyles into constants ( #3485 )
...
* Move blockStyles into constants.
2019-12-06 10:51:36 -08:00
Rachel Fenichel
5f4a308a40
Full-block editors for single-field reporters.
2019-11-11 14:32:31 -08:00
Sam El-Husseini
e7752e6ea2
Dummy input right alignment ( #3342 )
...
* Fix dummy input alignment in geras.
2019-10-28 16:20:54 -07:00
zochris
fa5f256a3f
Fix 'add test variable' button not working ( #3346 )
2019-10-28 09:26:27 -07:00
alschmiedt
fdc9074540
Color blind themes ( #3322 )
...
* Add themes for deuteranopia, protanopia, and tritanopia
2019-10-23 14:23:37 -07:00
Sam El-Husseini
2ac4149d98
Misc compiler warnings. ( #3172 )
...
* Fix misc compiler warnings. Use ws.getToolbox() instead of ws.toolbox_
2019-10-07 11:06:56 -07:00
Sam El-Husseini
db33e821da
Remove call to setText in playground ( #3168 )
...
* Remove last instance of setText
2019-10-04 15:57:35 -07:00
Sam El-Husseini
e92bae1dda
Download screenshot in playground ( #3148 )
...
* Add an option on the playground to download a screenshot of the blocks on the workspace.
2019-10-03 14:35:12 -07:00
Sam El-Husseini
31a2544989
Rename sample renderer to minimalist ( #3137 )
...
* Rename sample to minimalist
2019-10-02 14:16:36 -07:00
Sam El-Husseini
d28e897e47
Add a sample renderer instance. ( #3136 )
...
* Add a sample renderer instance.
2019-10-02 13:22:54 -07:00
Sam El-Husseini
edf3d0cfe2
Don't require everything in uncompressed. ( #3120 )
...
* Don't require everything in uncompressed.
2019-09-27 14:26:10 -07:00
Neil Fraser
b701475984
Simplify trashcan code ( #3110 )
...
Also delete unused props in CSS.
2019-09-27 11:43:56 -07:00
Monica Kozbial
328f2c3373
Removing deprecated renderMode reference in playground. ( #3107 )
2019-09-27 11:12:49 -07:00
Sam El-Husseini
870824bc3e
Workspace theme ( #3093 )
...
* Move the theme object so it's on the workspace.
* Add support for subscribing UI elements to theme component styles and changes.
2019-09-26 16:52:17 -07:00
Beka Westberg
1c3db256fa
Added angle field config ( #3038 )
...
* Added angle field configuration.
2019-09-19 16:15:20 -07:00
Beka Westberg
a8a8c320d5
Changed multiline field to use new configuration ( #3044 )
...
* Changed multilineinput field to new configuration.
2019-09-18 16:30:17 -07:00
Sam El-Husseini
c524980f31
Cache dynamic dropdown options ( #3036 )
...
* Cache dynamic dropdown options and only re-generate on initialization and render.
2019-09-18 13:05:25 -07:00
kozbial
94dd4e609b
htmlFor > for
2019-09-16 17:16:25 -07:00
kozbial
550c13739c
Removing foreach usage.
2019-09-16 17:04:18 -07:00
kozbial
53cb811f78
Addressing PR comments.
2019-09-16 11:42:28 -07:00
kozbial
02e5b77a20
Adding checkboxes for debug rendering options to playground.
2019-09-16 11:42:28 -07:00
Sam El-Husseini
fc420b7037
Support for registering renderers and switching between them ( #3013 )
...
* Added support for registering renderers and for choosing which renderer the workspace wants to use.
2019-09-13 10:30:20 -07:00
Sam El-Husseini
f3f3329355
Fix configure method ( #2915 )
...
* Fix configure method.
2019-09-12 17:01:03 -07:00
Rachel Fenichel
6f4476c962
Textarea Field, Multiline Block (from acbart) ( #2663 )
...
* Field Textarea, text_multiline block, generators
2019-09-11 17:57:46 -07:00
alschmiedt
4a80889ef1
Enter accessibility ( #2982 )
...
* Fix shift clicking on a block
* Add tests for toggle keyboar nav
2019-09-09 16:41:06 -07:00
Sam El-Husseini
4c8e28c53d
Dynamic output shapes ( #2980 )
...
* Round and triangle dynamic output shapes.
2019-09-06 13:04:01 -07:00