Commit Graph

56 Commits

Author SHA1 Message Date
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
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
Aaron Dodson
0e6258ca1a Migrated to inline exports 2021-07-21 08:17:13 -07:00
Aaron Dodson
a8cba441e7 Fix comment indentation in core/connection_db.js 2021-07-19 14:33:15 -07:00
Aaron Dodson
f2ca659447 clang-format core/connection_db.js 2021-07-19 10:59:44 -07:00
Aaron Dodson
acd7e55968 Migrate core/connection_db.js to named requires 2021-07-19 10:59:08 -07:00
Aaron Dodson
a87b2b0bfa Migrate core/connection_db.js to goog.module 2021-07-19 10:53:42 -07:00
Aaron Dodson
f77d5f1264 Migrate core/connection_db.js to ES6 const/let 2021-07-19 10:49:20 -07:00
Neil Fraser
c5a7b481bc Code simplifications 2021-06-03 08:23:01 -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
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
Sam El-Husseini
fba35d342c Add missing require Blockly.constants (#4366) 2020-10-12 17:56:42 -04:00
Rachel Fenichel
1700efc77b Add distance parameter to canConnect 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
Rachel Fenichel
8ae3dc3d5e Cleanup 2020-07-16 17:40:13 -06:00
Rachel Fenichel
e24f3cef9b Add isDragging to canConnectWithReason and delete newly unused code paths. 2020-07-16 17:40:13 -06:00
Rachel Fenichel
bb8348befd Move to a single canConnect function, and update tests 2020-07-16 17:40:12 -06:00
Rachel Fenichel
c743a92bb9 Start work on connection type checker 2020-07-16 17:40:12 -06: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
52bef4463c Fix warnings related to connections. (#3306)
* Fix warnings related to connections.
2019-10-23 17:56:52 -04:00
Rachel Fenichel
608ce7b93c Merge pull request #3133 from BeksOmega/fixes/ConnectionTracking
Connection Tracking Pt 3: Changed connections to use 'tracked_' property
2019-10-07 11:05:10 -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
Beka Westberg
df5b5766c1 General cleanup. 2019-10-01 19:22:19 -07:00
Beka Westberg
9d47e2b34e Fixed adding and removing from connection DB (will be cleaned up a future PR, but I want to focus on cleaning connections). 2019-10-01 16:58:33 -07:00
Beka Westberg
d4e0594c2c Combined inDB_ and hidden_ into single tracked_ property. 2019-10-01 16:55:29 -07:00
Neil Fraser
9f6c1c316a Refactor workspace.connectionDBList
It seems wrong that Blockly.ConnectionDB.init reaches in to create a property on workspace.
It seems wrong that this database isn’t disposed of when the workspace is.
It seems unnecessary that disposed connections need to drop their reference *to* the workspace’s database since the connection object is going away anyway, and the databases aren’t.
2019-06-12 13:15:39 -07:00
Neil Fraser
5bf7069a2f Remove goog.math.Coordinate 2019-06-07 10:32:57 -07:00
Neil Fraser
405b1e4e78 Lint issues found while debugging. 2019-03-27 15:47:29 -07:00
Neil Fraser
1d3742a3dc Use a real JS array for the connection DB.
Previously “Array.isArray(connectionDB)” was false, even through “connectionDB instanceof Array” was true.
2019-02-01 15:25:19 -08:00
Neil Fraser
3909bd420a Remove all goog.asserts and goog.isXxx
First step to reducing Closure’s footprint.
2018-07-11 12:20:02 -07:00
Rachel Fenichel
9a53e96d53 More lint fixes 2018-01-23 18:22:53 -08:00
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
Rachel Fenichel
640b38f38e lint 2016-05-05 13:13:48 -07:00
Neil Fraser
c785cabe40 Use more coordinates. 2016-04-19 23:24:42 -07:00
Neil Fraser
61b3fbfe11 Move block database to workspace. 2016-04-05 18:43:39 -07:00
Neil Fraser
d086634394 Lint and recompile. 2016-03-18 15:19:26 -07:00
Neil Fraser
a3b850b0d3 Merge pull request #287 from rachel-fenichel/feature/source_block_fn
Add a getter; stop accessing private field sourceBlock_ from outside …
2016-03-16 19:45:20 -07:00
rachel-fenichel
2c70f7ec26 Add a getter; stop accessing private field sourceBlock_ from outside of a connection. 2016-03-15 16:03:49 -07:00
Neil Fraser
8fb1178ed8 Update message descriptions. 2016-03-14 16:00:25 -07:00
rachel-fenichel
50975170d7 Fix search for closest 2016-03-11 13:13:34 -08:00