Commit Graph

248 Commits

Author SHA1 Message Date
alschmiedt 835fb02343 fix: setting null for a font style on a theme (#5831) 2022-01-04 15:06:41 -08:00
Christopher Allen c0d22f2002 refactor: Rename ALIGN to Align and move from constants.js to input.js (#5742)
This constant is used to specify the alignment of
an Input, so it should live in the same file as the Input class.

I've done this as a separate named export, but it could alternatively
be made a static member of Input (i.e., Input.Align with only Input
being exported by name).

Where mocha tests were referring to Blockly.constants.ALIGN.*
without actually requiring Blockly.constants, I have reverted
them to refer to Blockly.ALIGN_* instead (pending conversion
to named requries).

Part of #5073.
2021-11-29 21:59:48 +00:00
Rachel Fenichel 969fcac455 chore: Move functions from utils (#5706)
* chore: move functions from utils to more specific files

* chore: use new names for utils functions

* chore: run clang-format

* chore: add deprecation warnings back to utils.js
2021-11-15 15:59:27 -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
alschmiedt 0f3c06306f chore: runs clang format on all files (#5627) 2021-10-21 15:22:24 -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
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
Christopher Allen c5ffd036ca fix: JSDoc improvments for accessors, etc. (#5567)
* fix: Revert removal of documentation for get/set accessors.
  
  This partially reverts commit 839cb7b,
  "fix: infinite loop when using defineProperties (#5549)"

* docs: Use @name to attach JSDocs to accessors

  Reintroduce documentation for deprecated properties where it was
  removed when converting them to accessors.

* docs: Remove duplicate @package declarations

* fix: Fix eslint and compiler errors/warnings

* fix: Minor JSDoc tweaks to address comments on PR #5567
2021-09-29 01:57:28 +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 f67214dac5 Update @package annotations (#5558) 2021-09-28 08:55:49 -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
alschmiedt 2b34748e0e chore: remove declareLegacyNamespace from events (#5532)
- Adds an extra events/utils.js file to hold helper methods related to events.
2021-09-24 14:20:32 -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
Aaron Dodson 6b07ccab96 chore: Remove declareLegacyNamespace from renderers (#5528)
* chore: Remove declareLegacyNamespace from Geras renderer

* chore: Remove declareLegacyNamespace from minimalist renderer

* chore: Remove declareLegacyNamespace from thrasos renderer

* chore: Remove declareLegacyNamespace from zelos renderer

* fix: Move debugger functionality out of Blockly.blockRendering to avoid dependency cycle when re-exporting submodules

* chore: Remove declareLegacyNamespace from Blockly.blockRendering.*
2021-09-24 08:33:35 -07: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
Christopher Allen e7955084ae refactor: Remove remaining references to Blockly.* from goog.modules (#5505) 2021-09-21 17:51:35 +01:00
Christopher Allen c31895dc60 fix: Add missing require for Blockly.utils.object, .Size (#5427)
Some files were using Blockly.utils.object.inherits (or .mixin) without
having imported Blockly.utils.object.

Similarly, trashcan.js tried to use utils.Size as a constructor
instead of importing Size from Blockly.utils.Size.
2021-09-03 22:45:54 +01:00
kozbial 8a48ba2642 clang-format core/renderers/common/debugger.js 2021-08-12 09:53:30 -07:00
kozbial f02e0015f5 Migrate core/renderers/common/debugger.js named requires 2021-08-12 09:53:30 -07:00
kozbial d6dc3807e9 Migrate core/renderers/common/debugger.js to goog.module 2021-08-12 09:53:30 -07:00
kozbial a557320eef Migrate core/renderers/common/debugger.js to ES6 const/let 2021-08-12 09:53:30 -07:00
kozbial 62fff867d8 clang-format core/renderers/common/renderer.js 2021-08-11 13:45:38 -07:00
kozbial 15c512f6ea Migrate core/renderers/common/renderer.js named requires 2021-08-11 13:45:38 -07:00
kozbial c1bf49ae5c Migrate core/renderers/common/renderer.js to goog.module 2021-08-11 13:45:38 -07:00
kozbial 684047d22f Migrate core/renderers/common/renderer.js to ES6 const/let 2021-08-11 13:45:38 -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
kozbial 1487698343 Remove extra newline and remove unecessary package annotation 2021-08-09 18:23:07 -07:00
kozbial 70d8ca2a20 clang-format core/renderers/common/block_rendering.js 2021-08-09 18:23:07 -07:00
kozbial f565120efb Migrate core/renderers/common/block_rendering.js named requires 2021-08-09 18:23:07 -07:00
kozbial a4a3b6a068 Migrate core/renderers/common/block_rendering.js to goog.module 2021-08-09 18:23:07 -07:00
kozbial 440be28b4a Migrate core/renderers/common/block_rendering.js to ES6 const/let 2021-08-09 18:23:07 -07:00
kozbial b233c5f10a Update visibility of constants 2021-08-04 09:20:20 -07:00
kozbial 99b30b92ce clang-format core/renderers/common/marker_svg.js 2021-08-04 09:20:20 -07:00
kozbial 3b43a19705 Migrate core/renderers/common/marker_svg.js named requires 2021-08-04 09:20:20 -07:00
kozbial 7aa382154c Migrate core/renderers/common/marker_svg.js to goog.module 2021-08-04 09:20:20 -07:00
kozbial 8eda99ea34 Migrate core/renderers/common/marker_svg.js to ES6 const/let 2021-08-04 09:20:20 -07:00
Monica Kozbial bec82da358 Remove require destructuring (#5294) 2021-08-03 15:07:14 -07:00
kozbial 3d8a79fe96 Add missing eslint disable to core/renderers/common/i_path_object.js 2021-07-30 15:49:17 -07:00
kozbial 03de38c41a Add eslint disable 2021-07-30 15:19:26 -07:00
kozbial 31b10f1489 Migrate core/renderers/common/i_path_object.js named requires 2021-07-30 15:19:26 -07:00
kozbial 3aae7ffbde Migrate core/renderers/common/i_path_object.js to goog.module 2021-07-30 15:19:26 -07:00
Rachel Fenichel 55207a2e7f clang-format core/renderers/common/path_object.js 2021-07-27 14:41:29 -07:00
Rachel Fenichel cf3d22c490 Migrate core/renderers/common/path_object.js named requires 2021-07-27 14:39:02 -07:00
Rachel Fenichel c068a3b6f9 Migrate core/renderers/common/path_object.js to goog.module 2021-07-27 14:26:04 -07:00
Rachel Fenichel 1dfee3a722 Make defs private and add nullability 2021-07-23 16:39:40 -07:00