Commit Graph

183 Commits

Author SHA1 Message Date
Christopher Allen
4c40378b9a Use goog.requireType when importing interfaces (etc.) (#5343)
* Use goog.requireType when importing I* interfaces

Interfaces have no code, so should never be referred to outside of
(JSDoc) comments, and so the modules that define only interfaces never
need to be goog.require'd - goog.requireType is always sufficient.

This commit fixes imports of all modules whose name matches
/(.*\.)?I[A-Z]*/ - i.e., the hungarian-notation named ones in
core/interfaces/.

* Use goog.requireType when only using import for type specifications

Where a module is imported only to used in JSDoc comments it can
(and should) be goog.requireType'd instead of goog.require'd.

* Remove spurious eslint-disable no-unused-vars

There were a few cases where modules were being imported with
goog.require (because they are referred to in code, not just JSDoc
comments) but were prefaced by a spurious eslint suppress.

Remove these, restoring the invariant that an import gets an eslint
if and only if it is a requireType.

* Remove obsolete Closure Compiler error group

stricterMissingRequire has been superceded by missingRequire, and now
causes a Java null pointer exception if supplied.
2021-08-11 18:50:45 +01:00
kozbial
a7fcf881fa Add missing eslint disable line for required interface 2021-08-10 11:20:03 -07:00
kozbial
7eedf623d5 Change private static variable to local variable. 2021-08-09 14:59:22 -07:00
kozbial
e10be5444f clang-format core/workspace.js 2021-08-09 14:59:22 -07:00
kozbial
74b5a12c6d Migrate core/workspace.js named requires 2021-08-09 14:59:22 -07:00
kozbial
ac4fa41cb3 Migrate core/workspace.js to goog.module 2021-08-09 14:59:22 -07:00
kozbial
5f669a7607 Migrate core/workspace.js to ES6 const/let 2021-08-09 14:59:22 -07:00
kozbial
b834d9026b Add requireType calls for Blockly.WorkspaceComment and Blockly.WorkspaceCommentSvg 2021-08-06 18:05:53 -07:00
kozbial
ef0fcdbcdd Split Blockly.BlocklyOptions into a separate file 2021-08-05 10:50:44 -07:00
Neil Fraser
e661c92a36 More JSDoc improvements 2021-05-27 21:30:26 -07:00
Neil Fraser
f64c11d74e Make JSDoc object nullability more strict.
Also make Blockly.utils.deprecation.warn apply to properties.
2021-05-27 21:30:26 -07:00
Neil Fraser
d919b0af21 Update JSDoc from Array.<> to Array<>
Same with Object.
2021-05-27 21:30:26 -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
5780399750 Use registry for creating the no-category flyout (#4659)
* Use registry for creating the horizontal / vertical flyout
2021-03-01 10:00:47 -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
2360a12493 Fix remaining trivial missing requireTypes 2021-02-19 13:17:14 -08:00
alschmiedt
a8f28c6b11 Metrics refactor (#4627) 2021-02-10 16:19:56 -08:00
Beka Westberg
af9be6d9c3 Update some inline docs in block.js (#4241)
* Update some inline docs in block.js

* Fix build error
2020-09-01 10:27:17 -07:00
Rachel Fenichel
98b436031c Use registry for connection checker 2020-07-17 10:51:39 -06:00
Rachel Fenichel
809148b435 Fix compiler errors 2020-07-16 17:40:13 -06:00
Rachel Fenichel
7288c66294 Rename connectionTypeChecker->connectionChecker 2020-07-16 17:40:13 -06:00
Rachel Fenichel
01d33ce2e7 Fix type checks 2020-07-16 17:40:13 -06:00
Rachel Fenichel
c743a92bb9 Start work on connection type checker 2020-07-16 17:40:12 -06:00
Maribeth Bottorff
e4bbd451a3 Use Context Menu registry for block-level menu options (#4032)
Use registry for block-level context menu items.
2020-07-10 19:11:48 -07:00
Rachel Fenichel
c9c8af12a7 Remove some old deprecated functions 2020-07-08 17:31:16 -07:00
Monica Kozbial
8a2caf5c32 Distinguish between unset maxInstance and set to 0. (#3949) 2020-06-09 16:38:16 -07:00
Sam El-Husseini
1052f7548b Enable unusedPrivateMembers check (#3924)
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -07:00
Sam El-Husseini
317834ff59 Add accessibility interfaces and fix navigation types (#3908)
* Add accessibility interfaces and fix navigation types
2020-05-21 11:18:10 -07:00
Sam El-Husseini
fd916fdb9b Bounding Box interface (#3906)
* Add an interface describing a bounding box registered on the workspace

* Clear the bounding box array

* PR comments

* Update chromedriver
2020-05-19 18:06:11 -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
c84ee46a89 Setting default options in workspace constructor. (#3592)
* Setting default options in workspace constructor.

* Changing logic for parsing workspace options.

* Adding gridPattern declaration to options and updating options handling for workspace.

* Addressing PR comments.

* Moving objects to constructor.

* Using constructor instead of casting for Blockly.Options.

* fix eslint

* Adding types.

* Change in type.

* eslint fix.

* Fix typings.
2020-01-17 15:16:20 -08:00
Beka Westberg
6d1bb201f7 feat: Improved procedure arg interaction. (#3527)
* feat: Improved procedure arg interaction.

* Added docs.

* Fixed typos and typings.

* Fixed typings?

* Changed visibility to private.
2020-01-07 13:55:46 -08:00
alschmiedt
4ce67bb108 Fix moving cursor when block mutates (#3535)
* Fix moving cursor when block mutates
2020-01-02 15:12:06 -08:00
alschmiedt
481fe63302 Marker manager (#3497)
* Adds a marker manager
2019-12-10 10:53:34 -08:00
alschmiedt
10b3a9aa9a Refactor marker and cursor (#3484)
* Refactor marker and cursor
2019-12-04 14:50:58 -08:00
Sam El-Husseini
30343c8cf6 Move the theme manager into WorkspaceSvg (#3400) 2019-11-05 10:44:51 -08:00
Neil Fraser
123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07:00
alschmiedt
cbf867f441 Add keyboard navigation support for multiple workspaces (#3352)
* Add keyboard navigation support for multiple workspaces
2019-10-28 12:53:51 -07:00
Sam El-Husseini
759875a6c0 Resolve remaining compiler type warnings (#3334)
* Resolve remaining compiler warnings with inconsistent types.
2019-10-25 19:07:17 -04:00
Sam El-Husseini
d387841db2 Resolve remaining compiler warnings with visibility issues (#3335) 2019-10-24 19:13:51 -04:00
Sam El-Husseini
90ad0789f6 Fix 11 warnings related to variables and variable_model. (#3278)
* Fix 10 warnings related to variables and variable_model.
2019-10-22 14:26:59 -04:00
Sam El-Husseini
e07a3f03a9 Fix 14 warnings related to workspace svg (#3273)
* Fix warnings related to workspace svg
2019-10-17 15:06:22 -05:00
Sam El-Husseini
664cc3d6cd Fix warnings related to number of arguments passed. (#3270) 2019-10-17 11:47:30 -05:00
Sam El-Husseini
3c2c4677df Fix 55 warnings related to flyouts. (#3211)
* Fix 55 warnings related to flyouts.
2019-10-16 12:13:37 -05:00
alschmiedt
cf04a9529b Fix compilier warnings for keyboard nav (#3196)
* Fix compilier warnings for keyboard nav
2019-10-08 11:34:39 -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
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
1236660efd Actually make WS comments optional (#3130)
* Remove last reference to ws comments since its an optional module

* Also remove from workspace
2019-10-02 11:41:51 -07:00
Monica Kozbial
f4136fdc2a Adding test and updating TODO. (#3102)
* Adding test and updating TODO.

* changing bug number referenced in TODO
2019-09-27 11:12:37 -07:00