Commit Graph

171 Commits

Author SHA1 Message Date
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
Rachel Fenichel
9d6f4c8177 Fix types and review comments 2019-11-12 11:50:34 -08:00
Beka Westberg
dad8738e75 Cleaned up unbindEvent_ calls (#3429)
* Cleaned up unbindEvent_ calls.
2019-11-12 10:14:31 -08:00
alschmiedt
40bdfac017 Fix setting focus for workspace (#3425)
* Fix setting focus for workspace
2019-11-11 16:44:58 -08:00
Sam El-Husseini
95f2b232b9 Field constants (#3423)
* Move field text sizing constants to renderer constants
2019-11-11 16:13:50 -08:00
Rachel Fenichel
5f4a308a40 Full-block editors for single-field reporters. 2019-11-11 14:32:31 -08:00
Sam El-Husseini
649dc116ed Using a HTML canvas for computing the text width (#3000)
* Use a helper HTML canvas element to measure text width for better performance
2019-10-24 13:02:32 -04:00
Sam El-Husseini
8eba82b906 Fix 4 misc warnings (#3283) 2019-10-17 16:52:52 -05:00
Sam El-Husseini
c1c9121fcc Fix jsdoc. @return instead of @returns (#3271)
* Fix jsdoc. @return instead of @returns
2019-10-16 17:01:36 -05:00
Neil Fraser
013f2714a3 Cleanup aria usage. (#3261)
Use enums instead of arbitrary strings.
Delete unused Aria properties
Add missing requires.
Delete unused code.
2019-10-15 22:43:23 -07:00
Sam El-Husseini
2224bb2a4e More field dispose (#3201)
* Dispose of element references in fields.
* Fewer warnings
2019-10-15 17:56:53 -05:00
Beka Westberg
f4f9a67903 Fixed field editor disposal (#3109)
* Fixed field editor disposal.
2019-10-08 16:48:31 -07:00
RoboErikG
663809297d Set correct defaults for Fields (#3179)
null was being converted to 0 by Number() when it should cause the
default value to be set instead. This updates FieldNumber and
FieldAngle to handle nulls correctly. Also update jsdoc.

Fixes #3177
2019-10-07 11:38:32 -07:00
Sam El-Husseini
d0772ad496 Fix compiler warnings related to fields. (#3144)
* Fix compiler warnings related to fields.
2019-10-03 15:58:46 -07:00
Neil Fraser
b46a4fe286 Bring our license format up to date (#3127)
* Google changed from an Inc to an LLC.

This happened back in 2017 but we didn’t notice.  Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.

* Remove project description/titles from licenses

This is no longer part of Google’s header requirements.  Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).

* License no longer requires URL.

* Fix license regexps.
2019-10-02 14:46:56 -07:00
Sam El-Husseini
a57c7ffb13 Clean up fields by passing the right type in fromJson (#3095) 2019-09-26 12:03:17 -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
8fae0411f7 Check if a type exists before testing instanceof (#3031)
* Check if a type exists before instance of
2019-09-17 16:28:18 -07:00
Beka Westberg
8b9816abcb Text Field Config (#2986)
* Added text input field configuration.
2019-09-16 10:08:46 -07:00
Beka Westberg
af81239c42 Number Field Configuration (#2985)
* Added number field configuration.
2019-09-16 09:52:08 -07:00
Sam El-Husseini
f3f3329355 Fix configure method (#2915)
* Fix configure method.
2019-09-12 17:01:03 -07:00