Commit Graph

43 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
Sandeep Dubey
ec9092fd67 Changes Css.register API to accept string param (#5472)
* Chnages Css.register API to accept string param

* Address self review comments and nits

* Fix code-comment

* Address minor review comments and nits

* Allow passing an array of strings when registering CSS

* Fix lint errors

Co-authored-by: Aaron Dodson <adodson@google.com>
2021-10-14 15:47:10 -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
Aaron Dodson
ede7e8c18d chore: Remove declareLegacyNamespace() from field_* files 2021-09-23 14:29:56 -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
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
kozbial
aeac27661d clang-format core/field_multilineinput.js 2021-07-22 18:05:36 -07:00
kozbial
d91f36eab9 Migrate core/field_multilineinput.js named requires 2021-07-22 18:05:36 -07:00
kozbial
8af597761d Migrate core/field_multilineinput.js to goog.module 2021-07-22 18:05:36 -07:00
kozbial
ae818c0526 Migrate core/field_multilineinput.js to ES6 const/let 2021-07-22 18:05:36 -07:00
Neil Fraser
2c6d044c40 Review updates 2021-07-11 23:19:01 -07:00
Neil Fraser
cba7a68207 Allow inheriting of fromJson in fields 2021-07-11 23:19:01 -07:00
Neil Fraser
cff7b359f4 Make comments more consistent. 2021-06-09 11:41:42 -07:00
Sam El-Husseini
f2f878db8c Fix multiple strict require warnings (#4793) 2021-04-21 16:46:04 -07:00
Laura Harker
5ff76ae32d Stop overriding @protected methods with @private (#4760)
An upcoming change to emit private properties in Google's internal version of
https://github.com/angular/clutz will otherwise break any
TypeScript depending on these types. This is because TypeScript errors
on overriding protected with private (Closure Compiler does not).
2021-04-06 11:05:41 -07:00
kozbial
7b4b818e96 Fix typo 2021-03-25 13:08:57 -07:00
Sam El-Husseini
63d26dc186 Add extra requires check (#4677)
* Add extra requires check
2021-03-05 09:50:51 -08:00
Gagik Papikyan
e4decd8f08 Added maxLines config option to MultilineInput (#4477)
* Added maxLines config option

* Made maxLines_ protected

* Added parentheses

* fontsize fix

* Enabled scrollbars at overflow of y axis

* Added ellipsis handling for overflow Y

* Deleted unused variable

* Added an explanation comment
2021-01-07 13:53:51 -08:00
Monica Kozbial
a523dacacb Link to multiline text field documentation in JSDoc (#4455)
* Link to FieldMultilineTextInput documentation in JSDoc

* Remove TODO
2020-11-17 13:49:03 -08:00
Monica Kozbial
e6cdbf9a5d Add fix for display text on multiline text block (#4454) 2020-11-16 17:19:42 -08:00
Sam El-Husseini
db40e44b7c Move Blockly.utils.dom.SvgElementType to Blockly.utils.Svg (#4285)
* Move SVGElementType to its own file shaving off 2.7KB
2020-09-16 14:42:58 -07:00
Eric Anderson
2b8208b1e2 Perf: Move multiline xml text encoding out of domToText (#4046)
* Move multiline xml text encoding out of domToText
2020-07-14 16:32:12 -07:00
Sam El-Husseini
0f3db47fa5 Use generics to derive SVG element type (#4036)
* Encapsulate type in a generic to automatically derive type of SVG element when using createSvgElement
2020-07-13 10:40:31 -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
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
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
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
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
Sam El-Husseini
95f2b232b9 Field constants (#3423)
* Move field text sizing constants to renderer constants
2019-11-11 16:13:50 -08:00
Neil Fraser
123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07: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
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
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
Neil Fraser
75cf614104 Break CSS into modules. (#3084)
* Break CSS into modules.

Drops the compile test by 3 KB.
Remove obsolete .blocklyDraggable class stub (it used to be dynamically changed).
Remove unused menuseparator CSS.
2019-09-25 18:01:19 -07:00
Neil Fraser
a03660243e Code cleanup, drop some CSS.
Random improvements to require statements.

Removal of some obviously dead CSS.

.blocklyDropDownDiv no longer supresses text selection (see comment in PR).

This PR drops the compiled size by 4 KB, which is larger than I was expecting.
2019-09-25 10:34:34 -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
Rachel Fenichel
6f4476c962 Textarea Field, Multiline Block (from acbart) (#2663)
* Field Textarea, text_multiline block, generators
2019-09-11 17:57:46 -07:00