Commit Graph

4222 Commits

Author SHA1 Message Date
Sophie Nguyen
31a323a17b Feat: Added an API to programmatically scroll the workspace (#7532)
* Feat: Added an API to programmatically scroll the workspace

Feat: Added an API to programmatically scroll the workspace

* Feat: Added an API to programmatically scroll the workspace
2023-09-23 09:53:15 -07:00
Sayali Kandarkar
e4d8f160aa fix: removed underscore from isLabel_ in flyout_button.ts (#7533)
* Removed underscore from isLabel_ in flyout_button.ts

* chore: rename isLabel_ to isFlyoutLabel in flyout_button.ts

* fix: format

---------

Co-authored-by: sayali-kandarkar <skandark@andrew.cmu.edu>
2023-09-22 15:32:39 -07:00
Sampada Bhujel
c37f4b8749 feat: Paste block in viewport / near cursor (#7521)
* fix: Paste block in viewport / near cursor

* Fix: formatting fix with prettier

* fix import path for Coordinate

* fix import path for coordinate

* paste so that the block's center is at the viewport center
2023-09-22 15:32:00 -07:00
Ramya Ramasamy
4437fdb089 feat: made the method isDragTowardWorkspace non private (#7529)
* removed internal from horizontal and vertical flyout

* feat : made the method isDragTowardWorkspace non private

* feat : made the method isDragTowardWorkspace non private

---------

Co-authored-by: Ramya Non-IU <ramyaram2092@outlook.com>
2023-09-22 14:28:48 -07:00
Rachel Fenichel
a4889732d6 Merge pull request #7528 from humera811/fixes
fix: move delete keyboard shortcut in-progress gesture check to precondition #6274
2023-09-22 14:21:28 -07:00
Akanksha Kushwaha
9051889c43 minor: update 'field_input.ts' file (#7514)
* minor: update return type of widgetCreate_

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>

* minor: remove 'as HTMLInputElement' cast

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>

* minor: update return type and cast

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>

---------

Signed-off-by: Akanksha Kushwaha <cmakanksha@gmail.com>
2023-09-22 13:50:16 -07:00
humera811
112d1ae78a Fix: Move delete keyboard shortcut in-progress gesture check to precondition 2023-09-22 13:48:54 -07:00
ivalkshfoeif
bb425358bf Add a getTargetWorkspace method to flyout_base.ts (#7519) 2023-09-22 12:52:23 -07:00
satya verma
4a6d4399d1 fix: incorrect blockchange firing (#7492)
* BlockChange event disabled

* BlockChange event disabled

* executed command (npm run format)
2023-09-21 05:34:24 -07:00
Beka Westberg
12ac35829e fix: loading tooltips before messages (#7504)
* fix: loading tooltips before messages

* fix: typing
2023-09-20 14:07:06 +00:00
laurensvalk
3b234c7f87 fix: Call onFinishEditing_ for fields on mobile. (#7483)
On the desktop, widgetDispose_ will call onFinishEditing_ on close.

This was missing in the mobile counterpart, so any cleanups in onFinishEditing_ would not be called.

Also update the message string comment while we are touching this code.
2023-09-20 06:15:17 -07:00
Neil Fraser
61cdbb65d3 chore: Setting style property to make CSP less grumpy. (#7503)
* Setting style property to make CSP less grumpy.

"Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src”)."

The 'style' property should be set as an object, not as a string, according to CSP rules.

Back-ported from Blockly Games.
2023-09-19 17:01:14 +02:00
Beka Westberg
32c9daf885 fix: bad JSON state leaving events disabled (#7501)
* fix: broken JSON state stopping event firing

* chore: add unit test for events not breaking
2023-09-19 05:17:51 -07:00
Beka Westberg
f8a134caef fix: immediately render for JavaFX (#7502) 2023-09-18 20:12:20 +00:00
Beka Westberg
25d15fd596 fix: zelos full block fields rendering badly (#7490)
* fix: text input fields

* fix: colour field

* chore: cleanup override keywords

* chore: revert playground changes

* fix: applyColour not being called

* chore: swap visibility for display

* chore: cleanup for PR comments

* fix: PR comments
2023-09-14 22:22:40 +00:00
Rachel Fenichel
fc76981e5b Merge pull request #7482 from clementcontet/fix-7426
fix: insertion marker position when connection is resized (#7426)
2023-09-13 10:50:56 -07:00
Clément Contet
36b00fb660 chore: format 2023-09-13 07:49:13 +02:00
Clément Contet
b95067b949 chore: position insertion marker in a single function 2023-09-12 11:11:31 +02:00
Beka Westberg
4eba35ec7b fix: doFullSerialization for insertion markers (#7467) 2023-09-11 08:38:51 -07:00
John Nesky
1b2e91246e chore: Use JSON objects for context menu callbackFactory (#7382)
* chore: use json object for context callbackFactory

* Add test file for context menu callback function.
2023-09-08 16:16:59 -07:00
Beka Westberg
344861698e fix: connection highlight not disposed when block deleted (#7454) 2023-09-06 10:11:36 -07:00
Clément Contet
a2a9ab1da4 fix: insertion marker position when connection is resized (#7426) 2023-09-04 21:07:11 +02:00
Maribeth Bottorff
68261e5dd9 feat: add getVariableName and getProcedureName to CodeGenerator (#7445)
* feat: add getVariableName and getProcedureName to CodeGenerator

* feat: make nameDB_ public

* feat: update block code generators to use new APIs

* chore: fix build

* chore: remove unused imports
2023-08-31 10:49:17 -07:00
Christopher Allen
b0a7c004a9 refactor(build): Delete Closure Library (#7415)
* fix(build): Restore erroneously-deleted filter function

  This was deleted in PR #7406 as it was mainly being used to
  filter core/ vs. test/mocha/ deps into separate deps files -
  but it turns out also to be used for filtering error
  messages too.  Oops.

* refactor(tests): Migrate advanced compilation test to ES Modules

* refactor(build): Migrate main.js to TypeScript

  This turns out to be pretty straight forward, even if it would
  cause crashing if one actually tried to import this module
  instead of just feeding it to Closure Compiler.

* chore(build): Remove goog.declareModuleId calls

  Replace goog.declareModuleId calls with a comment recording the
  former module ID for posterity (or at least until we decide
  how to reformat the renamings file.

* chore(tests): Delete closure/goog/*

  For the moment we still need something to serve as base.js for
  the benefit of closure-make-deps, so we keep a vestigial
  base.js around, containing only the @provideGoog declaration.

* refactor(build): Remove vestigial base.js

  By changing slightly the command line arguments to
  closure-make-deps and closure-calculate-chunks the need to have
  any base.js is eliminated.

* chore: Typo fix for PR #7415
2023-08-31 00:24:47 +01:00
Christopher Allen
be809d9d98 refactor(tests): Migrate generator tests to import shims; delete bootstrap.js (#7414)
* refactor(tests): Use shims instead of bootstrap to load Blockly

  - Modify tests/generators/index.html to import the test shims
    instead of using bootstrap.js to load Blockly.

  - Modify test/generators/webdriver.js to have it wait for the
    workspace to exist before calling loadSelected().  There was
    previously a race which index.html had been winning, but
    now webdriver.js is winning (and the tests failing because
    there is no workspace yet when start() is called.

* chore(tests): Delete bootstrap.js etc.

  - Delete bootstrap.js, bootstrap_helper.js, and bootstrap_done.mjs.
  - Remove remaining references to bootstrap.js

* refactor(build): Remove deps npm script

  buildDeps is now only needed by buildCompiled, not ever for
  runnning in uncompressed mode, so:

  - Remove the deps gulp task (and the deps npm script.
  - Have the minify task run buildJavaScript and buildDeps directly.

  Additionally, the buildAdvanceCompilationTest target hasn't
  needed deps.js for some time (if ever), so skip having it run
  buildDeps entirely.

* refactor(build): Repatriate DEPS_FILE to build_tasks.js

  Since this is no longer used anywhere else it doesn't need to
  live in common.js.

* fix(scripts): Remove vestigial references to deps.mocha.js

* docs(tests): Add additional explanatory note
2023-08-31 00:02:58 +01:00
Beka Westberg
8193cffe77 chore: clean up mutator tests (#7434)
* chore: work on cleaning up mutator tests

* chore: remove need for dragBlockSelector

* chore: add helpers to clean up tests

* chore: add issue link in TODO

* chore: format and add docs for new helpers

* Revert "chore: remove need for dragBlockSelector"

This reverts commit dfec88a6aa.

* chore: fixup connect helper
2023-08-28 22:01:10 +00:00
Rachel Fenichel
51651dffe8 Revert "feat: Insertion marker json deserialization 7316 (#7364)" (#7430)
This reverts commit 84215386fb.
2023-08-24 10:46:46 -07:00
Rachel Fenichel
9db853db76 Revert "fix: insertion marker's next blocks become real block (#7384)" (#7429)
This reverts commit 18ee0ec41b.
2023-08-24 10:41:17 -07:00
Beka Westberg
7e3472c305 fix: dragging blocks within a zoomed mutator (#7423) 2023-08-24 08:34:45 -07:00
Maribeth Bottorff
b9a7a0c7ad fix: do not create extra shadow blocks when mirroring events (#7427) 2023-08-23 16:20:40 -07:00
Rachel Fenichel
d6d1074f51 chore: make ordered argument optional for workspace_svg functions (#7425) 2023-08-22 11:24:11 -07:00
randrei12
93106777b0 feat: make ordered argument optional for workspace functions (#7424) 2023-08-22 10:28:10 -07:00
Aaron Dodson
9909868435 fix: Always draw dragged blocks atop others in the workspace. (#6874)
* fix: Always draw dragged blocks atop others in the workspace.

* chore: format

---------

Co-authored-by: Beka Westberg <bwestberg@google.com>
2023-08-21 14:58:30 -07:00
Beka Westberg
a0301a217a feat: make generator quoting methods public (#7392)
* feat: make quoting methods public

* feat: add quote and multilineQuote methods

* fix: update code generators to use new methods

* chore: remove aliases

* chore: revert changes to generators
2023-08-21 09:05:23 -07:00
Beka Westberg
cb0f7032fd feat: add custom context menu rendering (#7409) 2023-08-17 14:50:41 -07:00
Rachel Fenichel
60aa99af53 chore: clean up measurement code in mini workspace bubble (#7408) 2023-08-17 13:00:25 -07:00
Beka Westberg
82f6ca5766 fix: saveConnections listener not being disposed (#7407) 2023-08-17 11:39:09 -07:00
Beka Westberg
b602f2163b feat: add accessors for the workspace svg group and block canvas (#7394) 2023-08-16 16:56:54 -07:00
Rachel Fenichel
10ab8738af chore: fix docs in FieldImage (#7403) 2023-08-16 16:30:58 -07:00
Beka Westberg
9efd944de7 fix: block change serialization (#7400) 2023-08-16 15:05:08 -07:00
Beka Westberg
b4ce6afd2a feat: add doFullSerialization support to blocks (#7363)
* feat: add doFullSerialization support to blocks

* chore: PR comments
2023-08-16 09:30:13 -07:00
Beka Westberg
bb33531854 deprecate: workspace paste (#7356)
* fix: deprecate paste

* chore: add deprecation tag

* fix: add import lost in rebase

* chore: PR feedback

* chore: fix @deprecated tag
2023-08-15 13:12:12 -07:00
Hollow Man
18ee0ec41b fix: insertion marker's next blocks become real block (#7384)
Don't add next block to the insertion marker when we do
an insertion marker json serialization.

Also, to keep consistent with the old behavior, we don't
need to add input blocks for the insertion marker.

And we don't need to do a full serialization here as it
will just become an insertion marker.

Resolves #7383

Address issues in PR #7364

Signed-off-by: Hollow Man <hollowman@opensuse.org>
2023-08-14 09:19:42 -07:00
John Nesky
f246adbd26 feat: Parse newlines in JSON message as row separators. (#6944)
* feat: Parse message newlines as endOfRow dummies.

* Fix the multilineinput field test.

* Addressing PR feedback.

* Addressing PR feedback.

* Newline parsing now uses a new custom input.

* npm run format

* Added input_end_row to block factory.

* Addres feedback, fix endrow after external value.
2023-08-11 12:41:49 -07:00
Beka Westberg
1a41891bbe feat: merge copy paste work into develop
Merge pull request #7379 from google/operation-copy-that
2023-08-11 11:47:15 -07:00
Devansh Varshney (देवांश वार्ष्णेय)
be2a6bb41d feat: Export shape interfaces from ConstantProvider (#7373)
* feat: Export shape interfaces from ConstantProvider

* feat: removed  import/export ConstantProvider
2023-08-11 10:37:31 -07:00
Beka Westberg
e30c4acd92 chore: upgrade keyboard shortcuts and context menus to use non-deprecated APIs (#7352)
* chore: remove references to clipboard.copy in shortcuts

* chore: remove references to clipboard.copy in context menus

* chore: fix tests

* chore: format

* fix: PR comments
2023-08-11 09:38:50 -07:00
Maribeth Bottorff
8b6c780c3e fix: remove specific warning text (#7376)
* fix: remove specific warning text

* chore: teardown rendered workspace after test

* chore: reformat new tests
2023-08-11 00:01:12 +00:00
Beka Westberg
7bca438ab8 Revert "fix: removed X & Y from toolbox.ts and replaced movBy to moveTo (#7333)" (#7375)
This reverts commit dbe926db4a.

The reverted commit made it so that RTL flyouts were rendered incorrectly.
2023-08-10 20:40:08 +00:00
Beka Westberg
80b1b44540 fix: connect animation persisting (#7365)
* fix: connect animation

* chore: format
2023-08-09 12:46:09 -07:00