Commit Graph

4285 Commits

Author SHA1 Message Date
Alejandro Ramos
d56f52cb0a fix: Assign to containerDiv blockyWidgetDiv if it already exists (#7980)
* fix: assign to containerDiv if it already exists

* Delete unused return

* Fix if statement

* format file using Prettier

* Deduplicate lines and improve efficiency
2024-04-01 21:54:54 +00:00
Maribeth Bottorff
6767717d0b feat: allow duplicate registry values (#7988) 2024-04-01 14:13:25 -07:00
Neil Fraser
5a6f22f0f3 feat!: Throw errors on missing inputs (#7969)
Previously generators could generate code from inputs that didn't exist and get back the empty string.  This silent failure was causing problems for diagnosing issues.  This PR changes the behaviour so that an error is thrown.

This will break generators which rely on the previous behaviour.  Several of our demo blocks needed editing to accomodate this change.

Resolves #7665
2024-03-28 23:53:57 +01:00
Neil Fraser
2ea9e21e6d chore: Clean up variable assignment. (#7962)
* chore: Clean up variable assignment.

* fix: variable now const as a result of prev commit
2024-03-26 19:13:52 +01:00
dongjinlong
68b03d269d chore: remove repetitive words in comments (#7963)
Signed-off-by: dongjinlong <dongjinlong@outlook.com>
2024-03-26 13:27:40 +01:00
Aaron Dodson
199c00afd5 fix: Fix block disposal animations (#7948)
* fix: Fix block disposal animations

* chore: Run lint

* chore: Remove unused import

* fix: Remove unused function arg
2024-03-19 14:08:12 -07:00
Christopher Allen
a6208d78b7 fix(generators): Make scrub_ public (#7940)
Fixes #2156.

In PRs #7602, #7616, #7646, #7647 and #7654 the @protected
access modifier on scrub_ on the CodeGenerator subclasses
was not transcribed to the new typescript signature.  I was
going to re-add it, but this breaks some of the procedure
block generator functions which rely on it, and then
@BeksOmega pointed out that this might be one of the
CodeGenerator API functions which we had already decided
should be public—and lo and behold I found #2156.

Per discussion amongst team, I am not renaming it to
scrub at this time.
2024-03-15 22:01:46 +00:00
Blake Thomas Williams
b6b57215a8 fix: updated field_dropdown to properly infer its Field type with TS 5.3.3 (#7939)
* fix: updated field_dropdown to properly infer its Field type with TS 5.3.3

* fix: removed undefined as an option as its not needed for the type fix

* fix: updated field_dropdown to allow |undefined class validation
2024-03-15 14:45:16 -07:00
Neil Fraser
0ecbcde9fc chore: Use .includes and .startsWith, not .indexOf (#7936)
Easier to read than the diverse collection of `=== 0` and `!== -1` and `> -1` tests.
2024-03-15 00:03:55 +01:00
Rachel Fenichel
84218fe9b1 Merge pull request #7903 from google/rachel-fenichel-patch-2
chore: fix spelling in common.ts
2024-03-08 15:11:19 -08:00
Rachel Fenichel
3fccb75885 chore: format 2024-03-08 15:08:15 -08:00
Beka Westberg
8dee571469 chore: make getters for grid attributes public and update inline docs (#7865) 2024-03-08 09:16:18 -08:00
Beka Westberg
848415e48f fix: connection dancing (#7899)
* fix: special case zelos for connection previewing

* chore: add TODO
2024-03-08 08:45:11 -08:00
Beka Westberg
7c7dfd003f fix: shouldPreventMove not being respected (#7894)
* fix: shouldPreventMove not being respected

* fix: PR comments
2024-03-07 10:14:03 -08:00
Rachel Fenichel
ccd29be4c4 chore: fix spelling in common.ts
definiton -> definition
2024-03-06 11:37:38 -08:00
Beka Westberg
a517317b77 fix: restore respecting snap radius (#7873) 2024-02-21 10:13:03 -08:00
Beka Westberg
0e3a6e9705 fix: insertion marker drag scaling (#7874)
* fix: insertion marker drag scaling

* chore: added docs for other params
2024-02-20 14:27:00 -08:00
Beka Westberg
673b042639 chore: move connection previewer out of subfolder (#7835) 2024-02-16 08:31:55 -08:00
Rachel Fenichel
64803ff1ba Merge pull request #7854 from elvisvoer/develop
fix: typo in Click event class docs
2024-02-15 17:05:02 -08:00
Beka Westberg
9e46ed77ae fix: connection previewer disposing too early 2024-02-15 23:26:25 +00:00
Elvis Adomnica
a2228939ca fix: typo in Click event class docs 2024-02-15 11:17:31 +01:00
Beka Westberg
7557504693 fix: disposing of connection previewer (#7834) 2024-02-07 13:01:31 -08:00
Beka Westberg
bb8b2728e7 feat: make grid options togglable (#7828) 2024-02-07 11:48:09 -08:00
Beka Westberg
e67dd0ddf3 fix: insertion marker previewer finding wrong connection for different conn counts (#7833) 2024-02-05 15:36:10 -08:00
Beka Westberg
506970ab30 fix: destroy connection highlight when the connection is disposed (#7830) 2024-02-02 14:48:40 -08:00
Beka Westberg
919778eb56 fix: have the connection previewer use the registry (#7800) 2024-02-02 11:55:14 -08:00
Beka Westberg
018df03715 chore: deprecate insertion marker manager and related methods (#7797) 2024-02-02 11:55:14 -08:00
Beka Westberg
702eed42db fix: highlighting connections in zelos, also highlight connections moving (#7795)
* fix: remove zelos highlight override

* feat: add isHighlighted to rendered connection

* feat: add refreshing connection highlighting

* chore: remove highlight and unhighlight connection APIs

* chore: PR comments
2024-02-02 11:55:14 -08:00
Beka Westberg
0b344e7fab feat: update block dragger to use connection previewer (#7793)
* chore: reorganize drag logic

* chore: implement would delete block logic

* fix: just use snap radius.

Turns out the numbers are the same.

* chore: add connection previewing

* fix: applying connections

* chore: remove dragged connection manager from block dragger

* fix: deleting blocks
2024-02-02 11:55:14 -08:00
Beka Westberg
038c4afec0 feat: insertion marker previewer (#7792)
* chore: add noop InsertionMarkerPreviewer

* feat: add previewing replacements

* feat: add previewing insertions

* feat: add highlighting of connections to previewer

* fix: disabling events in the connection previewer

* chore: fixup docs

* chore: typo
2024-02-02 11:55:14 -08:00
Beka Westberg
f2c06fa907 chore: delete highlight path from connection (#7796) 2024-02-02 11:55:14 -08:00
Beka Westberg
318621d3c0 feat: add connection highlighting to zelos (#7781)
* feat: add connection highlighting to zelos

* fix: drawing outputs

* chore: cleanup
2024-02-02 11:55:14 -08:00
Beka Westberg
461dfac05a feat: connection highlighting in geras and thrasos (#7698)
* chore: move connection highlighting into the geras renderer

* chore: remove IConnectionHighlighter interface

* chore: format

* chore: fixup

* chore: format

* fix: PR comments
2024-02-02 11:55:14 -08:00
Beka Westberg
2c95c4202c feat: connection highlighter interface (#7638)
* feat: add connection highlighter interface

* fix: remove unnecessary method from the path object interface
2024-02-02 11:55:14 -08:00
Beka Westberg
dc9aa1befb feat: add connection previewer interface (#7637)
* feat: add connection previewer interface

* chore: PR comments
2024-02-02 11:55:14 -08:00
Ebrahim Haji
ff45a36835 fix: shadow blocks with variable fields are not allowed to be deserialized from XML (#7802) 2024-01-23 08:51:24 -08:00
Ebrahim Haji
e715269f0b fix: prevent block change event firing if editing is cancelled by using keypress (#7794)
* fix: prevent block change event firing if editing is cancelled

* refactor: formatted the code to specifications for commit 251c796d

ran npm run format
2024-01-19 08:13:32 -08:00
Maribeth Bottorff
49f65a235c fix: first block dragged from flyout will have same id (#7788) 2024-01-17 12:05:49 -08:00
Beka Westberg
0d1245c646 fix: cancelling all renders on triggering queued renders (#7787) 2024-01-16 14:23:58 -08:00
Beka Westberg
5ade042e95 fix: triggering flyout show from field render causing infinite loop (#7784)
* fix: triggering flyout show from field render causing infinite loop

* chore: add tests for triggering queued renders
2024-01-12 13:43:55 -08:00
truongductri01
7243b48d47 feat: add muted option (#7714)
* feat: add muted option

* fix: linter

* Update core/workspace_audio.ts

Co-authored-by: Beka Westberg <bwestberg@google.com>

* Update core/workspace_audio.ts

Co-authored-by: Beka Westberg <bwestberg@google.com>

* Update core/workspace_audio.ts

Co-authored-by: Beka Westberg <bwestberg@google.com>

* Update core/workspace_audio.ts

Co-authored-by: Beka Westberg <bwestberg@google.com>

---------

Co-authored-by: Beka Westberg <bwestberg@google.com>
2024-01-11 08:35:09 -08:00
Ebrahim Haji
2ebc6e14bc fix: prevent console logging duplicate deprecation warnings (#7733)
* (feat): added Set to prevent console logging multiple deprecation warnings #7719

* feat!: added Set to prevent console logging multiple deprecation warnings #7719

* refactor: renamed variable and rewrote comment

  Edited By Cpcallen
  Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>

* refactor: added guard clause and rewrote comment

  Edited By Cpcallen
  Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>

* refactor: removed checkMsg Variable name and replaced it with previousWarnings

* refactor: removed checkMsg Variable name and replaced it with previousWarnings

---------

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
2024-01-09 21:20:41 +00:00
Neerajkumar
fe0dc8694f fix: prevent flyout block highlighting during workspace drag (#7720) 2023-12-18 10:28:37 -08:00
Maribeth Bottorff
a3053955d3 feat: make fields and icons optionally clickable in flyouts (#7672)
* feat: add ability to click fields in flyouts

* feat: control if icons are clickable in flyouts

* fix: make default icons not clickable in flyout

* fix: use booleans like a real programmer
2023-12-06 19:02:45 +00:00
Beka Westberg
a2a041f212 fix: reenable showing empty flyouts (#7695) 2023-12-05 14:24:38 -08:00
Beka Westberg
45cc1e8fea fix: mutator coordinates not respecting flyout (#7690)
* fix: mutator coordinates not respecting flyout

* chore: fixup conditionals
2023-12-05 10:51:21 -08:00
Ananta Bastola
0836a1db10 fix: release dummy wheel listener on workspace dispose (#7693)
fix #7674
2023-12-05 09:42:35 -08:00
truongductri01
96a354b46b feat: added intermediate event change (#7671)
* feat: added intermediate event change

* fix: update prettier format for the code

* fix: update comment style

* fix: update test statements
2023-12-04 13:10:09 -08:00
Beka Westberg
71ded9dd89 fix: trashcan flyout opening on drag (#7691) 2023-12-04 11:14:19 -08:00
dependabot[bot]
80be8bc04c chore(deps): Bump prettier from 3.0.3 to 3.1.0 (#7658)
* chore(deps): Bump prettier from 3.0.3 to 3.1.0

Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.1.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: format

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Beka Westberg <bwestberg@google.com>
2023-11-27 13:25:51 -08:00