Commit Graph

191 Commits

Author SHA1 Message Date
Neil Fraser
90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Neil Fraser
c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Monica Kozbial
49bc2b1ae4 Replace namespace annotation with class annotation in files that define a class (#5566) 2021-09-28 15:57:09 -07:00
Monica Kozbial
d8fbe1b05b Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events

* Add annotations to files under core/interfaces

* Add annotations to files under core/keyboard_nav

* Add annotations to files under core/renderers

* Add annotations to files under core/serialization

* Add annotations to files under core/theme

* Add annotations to files under core/toolbox

* Add annotations to files under core/utils

* Add annotations to files under core
2021-09-27 14:42:54 -07:00
alschmiedt
2b34748e0e chore: remove declareLegacyNamespace from events (#5532)
- Adds an extra events/utils.js file to hold helper methods related to events.
2021-09-24 14:20:32 -07:00
Aaron Dodson
ede7e8c18d chore: Remove declareLegacyNamespace() from field_* files 2021-09-23 14:29:56 -07:00
Rachel Fenichel
3adfaaf6d9 chore: named exports for block* files (#5512)
* chore: named export for block.js

* chore: named export for block_drag_surface.js

* chore: named export for block_dragger.js

* chore: named export for block_svg.js

* Fix import ordering

* chore: fix imports using requireType

* Remove extra require
2021-09-22 08:46:19 -07:00
Beka Westberg
96935c2502 fix: cereal backwards compatibility (#5421)
* fix: remove duplicate serialization hook implementations

* feat: add backwards compatibility to field serialization

* feat: add support for serializing old mutator hooks

* fix: build

* fix: refactor field changes into helpers

* fix: typo

* fix: removing xmlns

* tests: add tests for serialization and deserialization of mutator hooks

* fix: switch to early returns
2021-09-20 13:08:35 -07:00
Beka Westberg
8faa360b74 feat: upgrade fields to use new JSO hooks (#5077)
* Upgrade field angle to use new serialization

* Upgrade field checkbox to use new serialization

* Upgrade field colour to use new serialization

* Upgrade field dropdown to use new serialization

* Upgrade serializable label field to use new serialization

* Upgrade field multiline input to use new serialization

* Upgrade field number to use new serialization

* Upgrade field text input to use new serialization

* Upgrade variable field to use new serialization

* Fix type casts

* Feedback from PR

* Switch to use getValue()
2021-09-20 13:08:35 -07:00
Aaron Dodson
ce8e7921a2 Move alert/confirm/prompt to a new file, dialog.js (#5457)
* Migrate prompt/alert/confirm to dedicated module

* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js

* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm

* Fix typo and errant redeclaration of Blockly.prompt

* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
2021-09-14 08:19:53 -07:00
Aaron Dodson
9046ce165b Migrate core/widgetdiv.js to goog.module syntax (#5331)
* Migrate core/widgetdiv.js to ES6 const/let

* Migrate core/widgetdiv.js to goog.module

* Migrate core/widgetdiv.js to named requires

* clang-format core/widgetdiv.js

* Mark WidgetDiv.DIV as deprecated and refactor callers to use setters/getters

* Fix deprecation date

* Refactor tests to make setDiv() in core/widgetdiv.js test-only

* Fix type annotations for WidgetDiv.DIV and move test cleanup into sharedTestTeardown
2021-08-16 10:23:50 -07:00
Monica Kozbial
bec82da358 Remove require destructuring (#5294) 2021-08-03 15:07:14 -07:00
Aaron Dodson
13272c3713 clang-format core/field_textinput.js 2021-07-22 10:23:06 -07:00
Aaron Dodson
9573f2b7ec Migrate core/field_textinput.js to named requires 2021-07-22 10:21:57 -07:00
Aaron Dodson
d2a43460d0 Migrate core/field_textinput.js to goog.module 2021-07-22 08:49:08 -07:00
Aaron Dodson
c3eaf1afc5 Migrate core/field_textinput.js to ES6 const/let 2021-07-22 08:44:28 -07:00
Neil Fraser
b3c94db951 Revert "Revert "Group field edits together for undo/redo""
This reverts commit 344ebcfd02.
2021-07-12 09:38:04 -07:00
Neil Fraser
cba7a68207 Allow inheriting of fromJson in fields 2021-07-11 23:19:01 -07:00
Neil Fraser
344ebcfd02 Revert "Group field edits together for undo/redo"
This reverts commit 33ad2448b8.
2021-06-29 11:35:21 -07:00
Neil Fraser
33ad2448b8 Group field edits together for undo/redo
Fixes #4189.
Also use 0 instead of 0px, in accordance with the rest of Blockly and Google’s CSS style guide.
2021-06-29 09:57:25 -07:00
Neil Fraser
9ad50ea98a Fix escape key on all fields. (#4934)
Currently the escape key fails to revert the value.  This is the inherited root of all type-in fields, including number, angle, and note.

Fixes #4910
2021-06-27 23:51:46 -07:00
Neil Fraser
cff7b359f4 Make comments more consistent. 2021-06-09 11:41:42 -07:00
Neil Fraser
dd0314bc0b Normalize comments 2021-05-19 09:57:14 -07:00
Sam El-Husseini
f2f878db8c Fix multiple strict require warnings (#4793) 2021-04-21 16:46:04 -07:00
Sam El-Husseini
63d26dc186 Add extra requires check (#4677)
* Add extra requires check
2021-03-05 09:50:51 -08:00
Sam El-Husseini
ab8a11784d Fix event related missing requires (#4656)
* Fix event related missing requires
2021-02-25 14:28:11 -08:00
Rachel Fenichel
1d8c234d33 Update uses of bindEvent_, bindEventWithChecks_, and unbindEvent_. Add missing requires for Blockly.browserEvents. 2021-02-23 11:23:28 -08:00
Rachel Fenichel
54c4e8de39 Rename Blockly.eventHandling->Blockly.browserEvents and replace all Blockly.EventData annotations 2021-02-22 13:23:19 -08:00
Rachel Fenichel
26d2b51681 Fix missing require types 2021-02-17 11:17:48 -08:00
alschmiedt
520aa600a6 Remove deprecated field functions (#4489) 2020-12-02 14:54:28 -08:00
Beka Westberg
76192da16e Fixes pitch field not working with prompt (#4436) 2020-11-09 10:50:21 -08:00
Monica Kozbial
981dc09d85 Update access level of methods in FieldTextInput (#4359) 2020-10-13 10:55:56 -07:00
Halit Anil Donmez
a131794ef0 add deprecation warning (#4356)
* add deprecation warning

* fix indent and update deprecation date
2020-10-07 13:16:27 -07:00
Monica Kozbial
4ac4332f5e Update logic for field default values. (#3953)
* Update logic for field default values.

* Fix bugs

* Use contant for default value.

* Fix FieldColour

* Update field number tests.

* Update field angle test.

* Minor update.

* Update field checkbox test.

* Undo enabling logging

* Remove only.

* Update field colour test.

* Update invalid test cases for field colour

* Update field label tests

* Update field textinput test.

* Minor cleanup

* Make lint happy.
2020-06-12 15:18:28 -07:00
Sam El-Husseini
1052f7548b Enable unusedPrivateMembers check (#3924)
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -07:00
Sam El-Husseini
71f7285333 Fix mutator field scale (#3763)
* Fix mutator zoom scale
2020-03-23 17:34:12 -07:00
Sam El-Husseini
13ac939b91 Support passing renderer overrides in options (#3734)
* Support passing in renderer options through workspace options.
2020-03-10 18:36:29 -07:00
Neil Fraser
4e2f8e6e02 Use SPDX licences.
This is a followup to #3127.
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Monica Kozbial
e2b510662c Fixing typo on "programmatically". (#3654) 2020-01-24 15:10:22 -08:00
Sam El-Husseini
5727a62c62 Revert on blur for text input fields as it interferes with combo boxes (#3634) 2020-01-22 11:23:33 -08:00
Sam El-Husseini
20e55b67d7 Fix bug with dropdown menu propagating the opening click event to a menu item (#3570)
* Prevent dropdown field menu from propagating a click event onto a menu item when the dropdown appears above the field
2020-01-09 18:08:29 -08:00
Sam El-Husseini
63f7af115c [zelos] Set field rect background colour (#3500)
* More consistent field rect colour in zelos. Only overriding in full block fields. Fix disabled block colours.

* Use a better constant name and fix build.
2019-12-10 08:31:43 -08:00
Sam El-Husseini
ec035f19d3 Count all fields when deciding whether or not a full text field should be used. (#3492) 2019-12-09 13:10:24 -08:00
Sam El-Husseini
abb74eda83 Fix the text input field colouring in full block fields. (#3489) 2019-12-06 10:01:03 -08:00
Sam El-Husseini
917f58ab0f Fix bugs with apply colour (#3483) 2019-12-03 13:22:41 -08:00
Sam El-Husseini
9fcc532977 [zelos] Cross browser pixel perfect text input (#3466)
* Align text and widget div text input pixel perfect on all browsers
2019-11-25 15:54:24 -08:00
Sam El-Husseini
f4431b3361 [Zelos] apply Colour (#3465)
* Only apply colour from a single entry point. Zelos rendering apply colour
2019-11-25 14:18:10 -08:00
Sam El-Husseini
139382e009 Field textinput pixel perfect input (#3443)
* Fix sizing of text input field in zelos, pixel perfect input in other browsers
2019-11-14 16:13:22 -08:00
Sam El-Husseini
2dea7038d5 Moves field layout constants into the renderer (#3437)
* Add field constants into renderer constants
2019-11-13 16:41:35 -08:00
Rachel Fenichel
939bafddd8 Merge branch 'develop' into single_field_blocks 2019-11-12 11:52:03 -08:00