Commit Graph

8708 Commits

Author SHA1 Message Date
Beka Westberg
139b4b993f fix: creating comments in RTL (#8153) 2024-05-20 09:54:30 -07:00
Neil Fraser
70ca676c24 fix: Properly size comments. (#8158)
* Properly size comments.

Fixes multiple rendering and sizing issues across different browsers.

Tip: `text-overflow: hidden;` is not legal CSS and did nothing.

Resolves #8142
2024-05-20 09:30:38 -07:00
Beka Westberg
36b75696a2 fix: comment text area bottom border hidden (#8152) 2024-05-20 09:03:59 -07:00
Maribeth Bottorff
c1a2284d94 chore: load block factory from unpkg (#8154) 2024-05-17 16:05:15 -07:00
Beka Westberg
69db8a63d6 fix: comment size not respecting collapsed-ness (#8136)
* fix: comment size not respecting collapsed-ness

* chore: fix tests the only way I know how, by adding explicit clock ticks
2024-05-17 13:23:13 -07:00
Beka Westberg
3fd749205f fix: dragging blocks by shadows to delete (#8138)
* Revert "fix: dragging shadow blocks (#7992)"

This reverts commit c0e6e6745f.

* fix: dragging by shadow not being deletable

* fix: unselecting shadows

* fix: revert changes to select and unselect
2024-05-17 13:22:53 -07:00
Neil Fraser
5a8969f855 fix: Zelos comments shouldn't be bold (#8141)
Resolves #8061
2024-05-17 21:33:52 +02:00
Beka Westberg
12ff96674b fix: comment handle position in RTL (#8151) 2024-05-17 12:27:14 -07:00
Beka Westberg
75d81620ab fix: undoing block delete over trashcan creates block in wrong place (#8126) 2024-05-17 12:26:10 -07:00
Maribeth Bottorff
53cc12da77 chore: fix playground context menu (#8139) 2024-05-17 09:48:41 -07:00
Maribeth Bottorff
80cacdcad7 Merge pull request #8140 from maribethb/grabby
fix: change cursor to grab on ws comment bar
2024-05-17 09:47:45 -07:00
Beka Westberg
44db3edce3 fix: comment move events and snapping (#8127) 2024-05-17 08:26:23 -07:00
Maribeth Moffatt
e4b734c0db fix: change cursor to grab on ws comment bar 2024-05-16 17:54:28 -07:00
Beka Westberg
280568e66e chore: rename airstrike -> scatter (#8130) 2024-05-16 11:20:43 -07:00
Sam El-Husseini
23af202796 fix: workspace comment bounding box affecting RTL zoom (#8125) 2024-05-16 10:36:36 -07:00
Sampada Bhujel
049993405e fix: JSON deserialization not firing variable create events for blocks (#8122)
* fix: JSON deserialization not firing variable create events for blocks

* fix: extract logic for checking added variables and firing event to checkNewVariables function
2024-05-15 15:46:23 -07:00
Beka Westberg
dfcf5317c1 fix: throwing errors for chameleon blocks (#8121) 2024-05-15 12:51:55 -07:00
Beka Westberg
dd9619dc94 fix: extra insertion markers being created (#8120)
* fix: extra insertion markers being created

* chore: remove unused value
2024-05-15 10:44:13 -07:00
Beka Westberg
e2eba2879d fix: connection db error for insertion markers (#8109) 2024-05-15 08:27:43 -07:00
Beka Westberg
392a38bb2e fix: drag cursor being incorrect for flyout blocks (#8107) 2024-05-14 13:24:20 -07:00
Neil Fraser
fca94ce799 fix: Remove deprecation warnings for 'disabled'. (#8104)
We must continue to support existing XML and JSON serialization formats since they are in external databases.

The decision was taken not to make the save formats compatible with older versions of Blockly.  We could not think of a convincing use-case for a newer Blockly's output to be read by an older Blockly.  If such a case appears, then our decision should change.

Resolves #8095.
2024-05-14 08:55:43 -07:00
Maribeth Moffatt
2f261ea9fa release: Update version number to 11.0.0-beta.12 2024-05-13 13:37:20 -07:00
Maribeth Moffatt
df396a9792 release: Update version number to 11.0.0-beta.11 2024-05-13 13:29:03 -07:00
Maribeth Bottorff
eb01ebe827 release: Merge branch 'rc/v11.0.0' into develop
release: Merge branch 'rc/v11.0.0' into develop
2024-05-13 11:34:40 -07:00
Maribeth Bottorff
74802bce37 Merge pull request #8100 from maribethb/merge-v11
release: Merge branch 'develop' into rc/v11.0.0
2024-05-13 11:28:36 -07:00
Maribeth Moffatt
0255c580f7 Merge branch 'develop' into merge-v11 2024-05-13 11:20:39 -07:00
Christopher Allen
59584c3a57 chore(build): Set "type": "commonjs" in dist/package.json (#8097)
Set "type": "commonjs" in the generated dist/package.json file,
since the .js files in the package root are CJS. This should be a
no-op since that's the default, but by setting it explicitly we
ensure that any change to the repository top-level
package.json to set "type": "module" won't break the
published package accidentally.
2024-05-13 10:55:58 -07:00
Neil Fraser
c0298652af feat: Add snapping to workspace comments. (#8070)
Now that there are two things that snap (blocks and WS comments), the alignment code in being moved to a common place.
2024-05-12 23:16:26 +02:00
Christopher Allen
2ebdc0b7f9 feat(build)!: Introduce ESM entrypoints (#8091)
* feat(build)!: Introduce ESM entrypoints for chunks

  Introduce an "import" conditional export for each of the chunk
  entrypoints (blockly/core, blockly/blocks, blockly/javascript
  etc.), and point these at wrappers created by build_tasks.js
  that import the corresponding <chunk>_compressed.js file and
  export its named exports.

  BREAKING CHANGE:

  Importing Blockly via

      import Blockly from 'blockly/core';

  (and similarly for the other chunk entrypoints) has worked until
  now because most build tools (including Webpack in particular)
  fuilfil the request for the default export of a CJS module by
  providing the module.exports object, rather than an
  explicitly-named default export as they would for an ES module.

  Since core/blockly.ts (the notional entrypoint for blockly/core)
  does not provide a default export, the wrappers created by this
  PR do not either.

  Code of the above form will therefore break, and should be updated
  to use a wildcard:

      import * as Blockly from 'blockly/core';

* feat(build)!: Introduce main package ESM entrypoint

  Introduce an "import" conditional export for the top-level
  package entrypoint (blockly), and point it at a wrappers
  created by build_tasks.js that imports the existing index.js
  file.

  BREAKING CHANGE:

  Importing Blockly via

      import Blockly from 'blockly';

  has worked until now because most build tools (including Webpack
  in particular) fuilfil the request for the default export of a
  CJS module by providing the module.exports object, rather than an
  explicitly-named default export as they would for an ES module.

  Since core/blockly.ts does not provide a default export, the
  wrapper created by this PR does not either.

  Code of the above form will therefore break, and should be updated
  to use a wildcard:

      import * as Blockly from 'blockly';

* feat(build)!: Introduce ESM entrypoints for langfiles

  Introduce an "import" conditional export for each of the
  langfile entrypoints (msg/en, msg/fr, etc.),, and point them
  at wrappers created by build_tasks.js that import the
  existing <lang>.js file.

  BREAKING CHANGE:

  Importing languages via

      import en from 'blockly/msg/en';

  has worked until now because most build tools (including Webpack
  in particular) fuilfil the request for the default export of a
  CJS module by providing the module.exports object, rather than an
  explicitly-named default export as they would for an ES module.

  Code of the above form will therefore break, and should be updated
  to use a wildcard:

      import * as en from 'blockly/msg/en';

* fix(typings): Remove bogus .d.ts file.

  For some reason we had a typings/msg/yue.d.ts that did not
  correxpond to any msg/json/yue.json.  Delete it.
2024-05-10 22:42:35 +01:00
Maribeth Bottorff
28ac0c4473 fix: improve types in FieldRegistry (#8062)
* fix: improve types in FieldRegistry

* chore: tsdoc
2024-05-10 14:14:50 -07:00
Beka Westberg
c704d5a887 revert: "feat: allow the dialog methods to take in extra parameters (#8084)" (#8085)
This reverts commit 278006b5f8.
2024-05-10 11:12:15 -07:00
Maribeth Bottorff
54eeb85d89 fix!: add getContents to IFlyout (#8064) 2024-05-08 11:44:00 -07:00
Beka Westberg
278006b5f8 feat: allow the dialog methods to take in extra parameters (#8084)
* feat: allow prompt to take in additional params

* feat: allow confirm tot ake in extra args

* feat: allow alert dialog to take in extra parameters

* chore: add tests for dialog methods
2024-05-08 10:10:09 -07:00
Neil Fraser
76e179d655 Revert "fix: Don't record undo events for enable/disable" (#8069)
This reverts commit 1a8e4d9e69.
2024-05-07 20:34:15 +02:00
Neil Fraser
4e688bf949 fix: Don't record undo events for enable/disable (#8058)
There's no need to record and replay these events since the change will happen automatically anyway.

Resolves #7951
2024-05-07 20:33:50 +02:00
Aaron Dodson
08183863e7 refactor: split out block serialization for creating new blocks from the flyout (#8065)
* refactor: split out block serialization for creating new blocks from the flyout

* fix: add JSDoc.

* chore: satisfy the linter.
2024-05-03 12:27:55 -07:00
John Nesky
171befa746 fix!: Only fire intermediate events when editing input with invalid text. (#8054)
* fix: Fire intermediate events only when editing text input.

* Prefix unused arg with underscore.

* Fix tests.
2024-05-02 18:57:57 -07:00
Richard Knoll
4861c7d98a fix: prevent duplication of comment icon bubbles (#8053) 2024-05-02 08:38:40 -07:00
Neil Fraser
185c82a991 fix: Don't record undo events for enable/disable (#8049)
There's no need to record and replay these events since the change will happen automatically anyway.

Related to #7951 and #7950.
2024-04-30 23:51:20 +02:00
Maribeth Bottorff
da97e782c4 feat: add block factory export in json (#8051) 2024-04-29 16:41:09 -07:00
Neil Fraser
5a5184ab4f fix: Correct list's "find" and "get" blocks help. (#8041)
* Correct list's "find" and "get" blocks help.

Both blocks were using the same help URL.

Two unrelated results of recompiling messages:
* Allow unwanted 'qqq' messages to be reverted.
* 'constants.json' is unchanged, but sorted.

Also improve python json dumping.
2024-04-26 20:23:43 +02:00
Christopher Allen
19fa49101a release: Update version number to 11.0.0-beta.10 blockly-v11.0.0-beta.10 2024-04-24 21:05:54 +01:00
Christopher Allen
a062ab87c8 fix(build): Reintroduce shims for subpackage entrypoints (#8050)
This is in effect a partial rollback of PR #7822.

This should solve issues encountered by users of bunders that don't
support exports at all (e.g. browserify) as well as ones that don't
support it in certain circumstances (e.g., when using webpack's
resolve.alias configuration option to alias 'blockly' to
'node_modules/blockly', as we formerly did in most plugins, which
causes webpack to ignore blockly's package.json entirely).

Assumptions:
- Such bundlers will _completely_ ignore the exports declaration.
- The bundles are intended to be used in a browser—or at least not
  in node.js—so the core entrypoint never needs to route to
  core-node.js.  This is reasonable since there's little reason to
  bundle code for node.js, and node.js has supported the exports
  clause since at least v12, considerably older than any version of
  node.js we officially support.
- It suffices to provide only a CJS entrypoint (because we can only
  provide CJS or ESM, not both.  (We could in future switch to
  providing only an ESM entrypoint instead, though.)
2024-04-24 20:52:22 +01:00
Beka Westberg
93c4d75fbd fix: comment highlight being positioned incorrectly in RTL (#8044) 2024-04-19 11:33:25 -07:00
Beka Westberg
69c5557e4f chore: fix comments being resizable when readonly (#8043) 2024-04-19 11:15:56 -07:00
Beka Westberg
7246bbc0d1 fix: comment text input size in samples (#8042) 2024-04-19 08:37:35 -07:00
John Nesky
cee7f916bb feat!: Invalid Blocks (#7958)
* feat: Invalid Blocks

* Rename the new json property from invalid to invalidReasons.

* Merged isValid into isEnabled.

* Minor fixes.

* More minor fixes.

* Reverting some stuff that didn't need to change.

* Addressing PR feedback.

* Update the BlockInfo interface to match State.

* Make BlockChange.disabledReason private.
2024-04-17 19:47:51 -07:00
Beka Westberg
7d8f88a4f1 chore: delete old comments (#8038)
* chore!: delete old comment classes and references

* chore: PR comments
2024-04-17 14:33:36 -07:00
Beka Westberg
a865744b7e fix: bumping comments into bounds (#8037) 2024-04-17 14:02:46 -07:00
Beka Westberg
41fe298a62 fix: cut shortcut for workspace comments (#8036) 2024-04-17 13:53:57 -07:00