Commit Graph

156 Commits

Author SHA1 Message Date
Beka Westberg 362ec011ce fix: re-add @package annotations as @internal annotations (#6232)
* fix: add ~70% of internal attributes

* fix: work on manually adding more @internal annotations

* fix: add more manual internal annotations

* fix: rename package typos to internal

* fix: final manual fixes for internal annotations

* chore: format

* chore: make unnecessary multiline jsdoc a single line

* fix: fix internal tags in serialization exceptions
2022-06-27 08:00:44 -07:00
Christopher Allen b0475b0c68 chore: Fix whitespace (#6243)
* fix: Remove spurious blank lines

  Remove extraneous blank lines introduced by deletion of
  'use strict'; pragmas.

  Also fix the location of the goog.declareModuleId call in
  core/utils/array.ts.

* fix: Add missing double-blank-line before body of modules

  Our convention is to have two blank lines between the imports (or
  module ID, if there are no imports) and the beginning of the body
  of the module.  Enforce this.

* fix: one addition format error for PR #6243
2022-06-24 19:33:39 +01:00
Christopher Allen d63670662b fix: Add missing import goog statements (#6240)
I've added the import statement immediately before the
goog.declareModuleId calls that depend on it.

There is an argument to be made that we should put the import
statement in their normal place amongst any other imports, and
move the declareModuleId statement to below the double blank
line below the imports, but as these are so tightly coupled,
replace the previous goog.module calls, and will both be deleted
at the same time once the transition to TypeScript is fully complete
I think it's fine (and certainly much easier) to do it this way.
2022-06-24 16:17:49 +01:00
Neil Fraser 161437388a chore: add declareModuleId (#6238) 2022-06-23 15:07:47 -07:00
Neil Fraser 889728a96a chore: Restore @fileoverview comment locations (#6237) 2022-06-23 11:43:34 -07:00
Beka Westberg 3ea312a4b6 chore: format 2022-06-17 19:53:57 +00:00
Beka Westberg f001bfc507 fix: convert files to typescript 2022-06-17 16:45:17 +00:00
Beka Westberg bdcb2465dd fix: rename all JS files to TS files 2022-06-17 16:45:17 +00:00
Rachel Fenichel daf78af13e fix!: fix or silence type errors (#6105)
* fix: add isBlockCreatable to IFlyout interface

* fix: add getClickTarget to IToolboxItem interface

* fix: fix some types in zelos renderer

* fix: add scrollToStart to IFlyout interface

* fix: add setVisible_ to IToolboxItem

* fix: use instanceof check for workspace comments in gesture code

* fix: data stored on the DOM for tooltips

* fix: use blockSvg to access icons

* fix: add instanceof check in shortcut_items.js

* fix: suppress warning about onKeyDown in tolbox

* fix: add instanceof check in workspace_svg

* fix: don't use dot accessor to avoid type problem

* fix: silence type errors in ast_node.js
2022-04-22 15:55:55 -07:00
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 9e8c5ea8ed refactor: convert some files to es classes (#5917)
* refactor: update several files to es6 classes

* refactor: update several files to es6 classes

* chore: add some type casts for specificity about event types

* chore: run formatter

* chore: rebuild
2022-02-09 08:29:39 -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
Rachel Fenichel f70032aaa6 chore: replace more uses of var with const and let (#5628)
* chore: fix uses of var in core/block_dragger

* chore: fix uses of var in core/extensions.js

* chore: fix uses of var in core/field_multilineinput.js

* chore: fix uses of var in assorted core files

* chore: fix uses of var in node test runner and playground screenshot code

* fix: undefined return from measureFontMetrics

* fix: violations of no-const-assign

* chore: only one variable declaration per line
2021-10-25 09:28:31 -07:00
Rachel Fenichel e8d6f7f408 chore: auto-fix violations of comma-dangle rule (#5625) 2021-10-21 09:01:51 -07: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
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
alschmiedt 73580b0ddb chore: named exports for keyboard_nav* files (#5517) 2021-09-22 11:25:38 -07:00
Rachel Fenichel 3adfaaf6d9 chore: named exports for block* files (#5512)
* chore: named export for block.js

* chore: named export for block_drag_surface.js

* chore: named export for block_dragger.js

* chore: named export for block_svg.js

* Fix import ordering

* chore: fix imports using requireType

* Remove extra require
2021-09-22 08:46:19 -07:00
alschmiedt cf091351d8 chore: remove deprecateLegacyNamespace from keyboard nav files
* chore: Remove deprecateLegacyNamespace & fix tests

* chore: export from the blockly file
2021-09-21 17:18:34 -07:00
Monica Kozbial bec82da358 Remove require destructuring (#5294) 2021-08-03 15:07:14 -07:00
kozbial 667048b3f5 Add eslint disable and make ASTNode a requireType 2021-07-28 10:52:20 -07:00
kozbial 1a83b75846 clang-format core/keyboard_nav/marker.js 2021-07-28 10:52:20 -07:00
kozbial 50f7293f2d Migrate core/keyboard_nav/marker.js named requires 2021-07-28 10:52:20 -07:00
kozbial 014316431e Migrate core/keyboard_nav/marker.js to goog.module 2021-07-28 10:52:20 -07:00
kozbial 3837440564 Migrate core/keyboard_nav/marker.js to ES6 const/let 2021-07-28 10:52:20 -07:00
kozbial fabba95beb Adding blocks to case statements in core/keyboard_nav/ast_node.js 2021-07-27 15:34:50 -07:00
kozbial d9edeca432 Update for loop syntax in core/keyboard_nav/ast_node.js 2021-07-27 15:34:50 -07:00
kozbial 02f1055c44 Add eslint disable lines to core/keyboard_nav/ast_node.js 2021-07-27 15:34:50 -07:00
kozbial c19ce37a4a clang-format core/keyboard_nav/ast_node.js 2021-07-27 15:34:50 -07:00
kozbial e79faf4147 Migrate core/keyboard_nav/ast_node.js named requires 2021-07-27 15:34:50 -07:00
kozbial ec06ea6586 Migrate core/keyboard_nav/ast_node.js to goog.module 2021-07-27 15:34:50 -07:00
kozbial e6bd6cabb1 Migrate core/keyboard_nav/ast_node.js to ES6 const/let 2021-07-27 15:34:50 -07:00
Aaron Dodson ee565f16d6 Silence unused variable warnings for requires used in JSDoc 2021-07-22 10:41:55 -07:00
Monica Kozbial c6650f0b83 Remove need for require instead of requireType for Block in ASTNode (#5157) 2021-07-21 16:53:08 -07:00
Rachel Fenichel cf7a8b95b8 Remove extra requires of Blockly.constants 2021-07-21 15:35:19 -07:00
kozbial ecec6daf80 clang-format core/keyboard_nav/tab_navigate_cursor.js 2021-07-21 10:26:15 -07:00
kozbial 9a6a92bf52 Migrate core/keyboard_nav/tab_navigate_cursor.js named requires 2021-07-21 10:26:15 -07:00
kozbial f282c57323 Migrate core/keyboard_nav/tab_navigate_cursor.js to goog.module 2021-07-21 10:26:15 -07:00
kozbial 9d6cbe96d3 Migrate core/keyboard_nav/tab_navigate_cursor.js to ES6 const/let 2021-07-21 10:26:15 -07:00
kozbial c9f2a92ace Migrate core/keyboard_nav/cursor.js named requires 2021-07-20 10:58:08 -07:00
kozbial e50c60bfdb Migrate core/keyboard_nav/cursor.js to goog.module 2021-07-20 10:58:08 -07:00
kozbial 317a2e6f53 Migrate core/keyboard_nav/cursor.js to ES6 const/let 2021-07-20 10:58:08 -07:00
kozbial 2ef8b2c86b clang-format core/keyboard_nav/basic_cursor.js 2021-07-20 10:42:03 -07:00
kozbial 4a3d67abeb Migrate core/keyboard_nav/basic_cursor.js named requires 2021-07-20 10:42:03 -07:00