Commit Graph

37 Commits

Author SHA1 Message Date
Aaron Dodson 1647a3299a fix: Move @alias onto classes instead of constructors (#6003)
* fix: Move @alias onto classes instead of constructors

* fix: Fix JSDoc for constructors.
2022-03-16 15:48:32 -07:00
Rachel Fenichel 4cf1a5c886 refactor: convert some files to es classes (#5913)
* refactor: update workspace_comment and _svg to es classes

* refactor: update classes that extend icon to es classes

* refactor: update icon to es6 class

* refactor: update connection classes to es6 classes and add casts as needed

* refactor: update scrollbar to es6 class and add casts as needed

* refactor: update workspace_svg to es6 class

* refactor: update several files to es6 classes

* refactor: update several files to es6 classes

* refactor: update renderers/common/info.js to es6 class

* refactor: update several files to es6 classes

* chore: rebuild deps.js

* chore: run format
2022-02-04 10:58:22 -08:00
Mark Friedman da3df70f6f feat: Enable the creation of concurrent, but not connected, output and previous connectors (#5702)
* Add new connection checks and tests

* Enable concurrent output and previous connections on blocks

  * and remove assumption from unplug().

* Make changes compatible with new module system

* Fix issue do to Connection class change.

  . and change some var's to const's now that that appears to be ok ;-)

* Fix more code that assumes only one of output and previous connections

* Change function name as per PR comment

* Fix lint errors

* Fix clang format issues
2021-11-24 17:03:21 -08:00
Rachel Fenichel f14a1c8034 chore: fix more lint (#5676)
* chore: fix assorted lint

* chore: clang-format

* chore: clang-format
2021-11-08 16:41:52 -08:00
Aaron Dodson 3851b14627 refactor: Migrate to named exports (#5623)
* refactor: Migrate to named exports

* fix: Sort requires

* fix: Remove duplicate deps
2021-10-20 15:53:23 -07:00
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
Christopher Allen d2d5dc4b71 fix: Use require instead of requireType for interfaces (#5568)
But only if the interface is used in an @implements or @extends
declaration.

Fixes #5450
2021-09-29 17:44:21 +01: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
Christopher Allen 8ab8536739 refactor: Migrate Blockly.ConnectionType to named exports (#5533)
* refactor: Migrate Blockly.ConnectionType to named exports
* Add corresponding information to renamings.js
2021-09-24 17:38:08 +01:00
Himanshu 3629ed5f65 refactor: Rename Blockly.connectionTypes to Blockly.ConnectionType (#5407)
* Renamed Blockly.connectionTypes to Blockly.ConnectionType
* Renamed core/connection_types.js to connection_type.js
* Add entry to renamings.js for renaming of Blockly.connectionTypes

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2021-09-24 12:45:10 +01:00
Aaron Dodson e0693a65d2 chore: Remove declareLegacyNamespace() from files in core (#5525)
* chore: Remove declareLegacyNamespace() from files in core

* fix: Update missing/errant re-exports in blockly.js
2021-09-23 14:48:52 -07:00
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
Rachel Fenichel 7bc461ea83 polish: export draggingConnections directly 2021-08-04 17:17:24 -07:00
Rachel Fenichel d5a6d7d3db Move draggingConnections to common 2021-08-04 15:59:41 -07:00
Monica Kozbial bec82da358 Remove require destructuring (#5294) 2021-08-03 15:07:14 -07:00
Aaron Dodson 83ff0ea09e Merge pull request #5148 from gonfunko/rerefactor
Update goog.module-migrated files to fix style issues
2021-07-22 08:09:53 -07:00
Rachel Fenichel 12636da182 Reorder some requires and rebuild 2021-07-21 15:47:55 -07:00
Rachel Fenichel b3f837a8d2 Replace references to constants with internalConstants 2021-07-21 15:33:55 -07:00
Aaron Dodson 0e6258ca1a Migrated to inline exports 2021-07-21 08:17:13 -07:00
Aaron Dodson bbdf5730f6 Reordered core/connection_checker.js requires 2021-07-19 08:10:47 -07:00
Aaron Dodson 5b9505802e clang-format core/connection_checker.js 2021-07-16 14:46:07 -07:00
Aaron Dodson e23560343e Migrate core/connection_checker.js to named requires 2021-07-16 14:45:35 -07:00
Aaron Dodson 50793c20cb Migrate core/connection_checker.js to goog.module 2021-07-16 14:30:16 -07:00
Aaron Dodson 29c560dfbb Migrate core/connection_checker.js to ES6 const/let 2021-07-16 14:26:36 -07:00
Sam El-Husseini 63d26dc186 Add extra requires check (#4677)
* Add extra requires check
2021-03-05 09:50:51 -08:00
Rachel Fenichel 750b62030b First pass at creating connectionTypes and inputTYpes 2021-03-04 10:22:24 -08:00
Rachel Fenichel 84446215c0 Update more missing requireTypes 2021-02-10 14:59:05 -08:00
Rachel Fenichel c9be2402bd More missing requires 2021-01-12 12:38:21 -08:00
Sam El-Husseini fba35d342c Add missing require Blockly.constants (#4366) 2020-10-12 17:56:42 -04:00
Rachel Fenichel 98b436031c Use registry for connection checker 2020-07-17 10:51:39 -06:00
Rachel Fenichel 1700efc77b Add distance parameter to canConnect 2020-07-16 17:40:13 -06:00
Rachel Fenichel 745017f325 Move from one, two to a, b 2020-07-16 17:40:13 -06:00
Rachel Fenichel e47d33148e Review feedback 2020-07-16 17:40:13 -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