Commit Graph

49 Commits

Author SHA1 Message Date
Beka Westberg
237e66cf29 refactor: convert row.js and base.js to ES6 classes (#5957)
* fix: remove unnecessary properties from rows

* refactor: run conversion script on measurables

* clean: cleanup from conversion

* fix: make debug build happy

* clean: format

* fix: remove widthWithConnectedBlocks assignment on element

* fix: add inline docs for statementEdge
2022-02-25 11:06:12 -08: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
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
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
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
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
Rachel Fenichel
cf7a8b95b8 Remove extra requires of Blockly.constants 2021-07-21 15:35:19 -07:00
Neil Fraser
d919b0af21 Update JSDoc from Array.<> to Array<>
Same with Object.
2021-05-27 21:30:26 -07:00
Neil Fraser
dd0314bc0b Normalize comments 2021-05-19 09:57:14 -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
107181d6f5 Missing requires, r through v 2021-02-17 14:52:06 -08:00
Rachel Fenichel
b2052aeff4 Add requireTypes for renderers/common 2021-02-02 11:38:08 -08:00
Sam El-Husseini
fba35d342c Add missing require Blockly.constants (#4366) 2020-10-12 17:56:42 -04:00
Sam El-Husseini
db40e44b7c Move Blockly.utils.dom.SvgElementType to Blockly.utils.Svg (#4285)
* Move SVGElementType to its own file shaving off 2.7KB
2020-09-16 14:42:58 -07:00
Sam El-Husseini
0f3db47fa5 Use generics to derive SVG element type (#4036)
* Encapsulate type in a generic to automatically derive type of SVG element when using createSvgElement
2020-07-13 10:40:31 -07:00
Sam El-Husseini
8c5c33902b Flash on render (#3721)
* Flash a block when it's renderered in debug mode
2020-03-05 13:26:10 -08:00
Sam El-Husseini
eb40ca44ba Dynamic fonts (#3698)
* Piping themes into the renderer and ensuring fields update their size information when constants change.
2020-02-20 17:16:01 -08: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
e1472a3600 Detect undefined elements in the debugger and remove undefined elem if a row has no elements when adding spacers. (#3576) 2020-01-11 17:33:20 -08:00
Sam El-Husseini
fe555d9021 Rename input connection to connectionModel (#3571)
* Remove input measurable's connection property and rename references to connectionModel.
2020-01-09 18:09:15 -08:00
Sam El-Husseini
a779d44104 Reduce the vertical spacing for spacers before and after an input row if it contains non-shadow connected blocks. (#3496) 2019-12-09 13:17:00 -08:00
Sam El-Husseini
fee606e2e0 Render negative elem spacing in debugger. (#3493)
* Render negative elem spacing in debugger.
2019-12-09 13:04:28 -08:00
Sam El-Husseini
f5bb5b6143 Zelos horizontal tight nesting. (#3490)
* Reduce the amount of implicit spacing added by the connection shape by adding negative spacing to the first and last spacer in an output block
2019-12-06 10:51:50 -08:00
Sam El-Husseini
4eb791bd70 [zelos] Add right connection shape element. (#3488)
* Add right connection shape element
2019-12-05 17:51:39 -08:00
Sam El-Husseini
42552b5b22 Fix 6 warnings related to rendering. (#3292) 2019-10-21 17:49:38 -04:00
Neil Fraser
01b6992efd Normalize to one spelling of color/colour. 2019-10-16 09:46:47 -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
Rachel Fenichel
ecf69d851d Use row height for spacer height. 2019-10-01 16:41:58 -07:00
Monica Kozbial
e551db41e0 Merge pull request #3017 from moniika/moniika-debug-render-checkmarks
Adding checkboxes for debug rendering options to playground.
2019-09-16 17:18:32 -07:00
Rachel Fenichel
77185906d8 Renderers define which paths a block has. (#2981)
* Move render elements into a path object.
2019-09-16 12:13:32 -07:00
kozbial
53cb811f78 Addressing PR comments. 2019-09-16 11:42:28 -07:00
kozbial
02e5b77a20 Adding checkboxes for debug rendering options to playground. 2019-09-16 11:42:28 -07:00
Rachel Fenichel
4b17234cba Alphabetize requires 2019-09-10 13:01:13 -07:00
Rachel Fenichel
135ab7993e Use ascender/descender naming for top and bottom rows; tweak position calculation. 2019-09-04 16:26:53 -07:00
Sam El-Husseini
189c561f49 Rendering type checker (#2950)
* Convert all rendering types to use a type enum flag.
2019-09-03 14:39:02 -07:00
Rachel Fenichel
aa8f4685da Add connectedBlockBounds option; set quieter defaults 2019-08-29 17:12:09 -07:00
Rachel Fenichel
c069316866 Debug configurability 2019-08-29 16:21:51 -07:00
Rachel Fenichel
d28c5dd8be Rename rendering files and folders 2019-08-26 10:48:44 -07:00