how to select multiple blocks?

246 views
Skip to first unread message

Ji Holmes

unread,
Mar 29, 2024, 12:15:01 PM3/29/24
to Blockly
Is there this kind feature?

Maribeth Moffatt

unread,
Mar 29, 2024, 1:22:40 PM3/29/24
to Blockly
Hello,

This feature is not built-in to the core library. However, App Inventor has published a multiselect plugin that does this.

(In case Google Groups eats the URL, you can find it on npmjs.com by searching for "blockly-plugin-workspace-multiselect")

Best,
Maribeth

On Friday, March 29, 2024 at 9:15:01 AM UTC-7 jihol...@gmail.com wrote:
Is there this kind feature?

Ji Holmes

unread,
Apr 2, 2024, 11:23:52 AM4/2/24
to Blockly
my blockly version is 10.0.2, it doesn't support the requirment of multiselect  blockly@">=10.4.0 <=11"

Beka Westberg

unread,
Apr 2, 2024, 11:30:07 AM4/2/24
to blo...@googlegroups.com
Hello!

Are you able to update to the latest version of Blockly? The plugin should work then =)

Best wishes,
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/43d8f3ef-07da-4c64-848b-732f80a19be8n%40googlegroups.com.

Mark Friedman

unread,
Apr 2, 2024, 1:27:36 PM4/2/24
to blo...@googlegroups.com
While you are in the process of updating your app to the latest version of Blockly, you might want to try version 0.1.9 of the plugin.  It appears to only require Blockly version 10.0.0.

-Mark


Ji Holmes

unread,
Apr 3, 2024, 2:53:16 AM4/3/24
to blo...@googlegroups.com
I had another problem while I was trying to use this plugin because my app is based on a separate local distribution of 10.0.2. Like this:
MyApp
└── packages
    └── blockly (folder for blockly)
        └── dist (blockly used in MyApp's package.json)
In my blockly folder, when I run npm -list blockly, I got my version to be blo...@9.2.0. So when I try to npm install version 0.1.9 in the blockly folder:
npm install @mit-app-inventor/blockly-plugin-wor...@0.1.9 --save

 It will cause issues:
------------------------------------START------------------------------------

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: blo...@10.0.2
npm ERR! Found: blo...@9.2.0
npm ERR! node_modules/blockly
npm ERR!   peer blockly@"^9.2.0" from @blockly/block...@3.1.2
npm ERR!   node_modules/@blockly/block-test
npm ERR!     @blockly/block-test@"^3.1.2" from @blockly/dev-...@5.3.1
npm ERR!     node_modules/@blockly/dev-tools
npm ERR!       dev @blockly/dev-tools@"^5.0.0" from the root project
npm ERR!     dev @blockly/block-test@"^3.0.0" from the root project
npm ERR!   peer blockly@"^9.0.0" from @blockly/dev-...@5.3.1
npm ERR!   node_modules/@blockly/dev-tools
npm ERR!     dev @blockly/dev-tools@"^5.0.0" from the root project
npm ERR!   5 more (@blockly/theme-dark, @blockly/theme-deuteranopia, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @mit-app-inventor/blockly-plugin-workspace-multiselect@"0.1.9" from the root project

------------------------------------END------------------------------------

-AleX

Mark Friedman <mark.f...@gmail.com> 于2024年4月3日周三 01:27写道:
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/ny0Z4PVBODI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/CAOk7GcQxmdzw93AbvJj8F_3RXryA8MYgK7uRyG1E4_x222yASA%40mail.gmail.com.

Maribeth Moffatt

unread,
Apr 3, 2024, 12:46:10 PM4/3/24
to Blockly
Hi Alex,

We'll need more info from you before we can figure out why this is happening. If you've downloaded version 10.0.2, we need to figure out why npm thinks you're using v9.

- What's the reason you're using a "local distribution" of Blockly? If you're willing to use npm for dependencies then we recommend you get Blockly from npm as well. It will make it a lot simpler to use plugins and keep up-to-date. Are you modifying/patching Blockly for some reason? If so we'd love to learn more about why so we can add any missing features so that you don't need to patch the library.
- Can you post the output of `npm ls blockly`? That will show us which package is downloading v9.
- Can you post your package.json file, or at least the dependencies section of it?
- Are you using a build/bundling tool such as webpack? If so which tool?

Hopefully with a bit more information we can figure this out!

Best,
Maribeth

Ji Holmes

unread,
Apr 7, 2024, 11:01:47 PM4/7/24
to blo...@googlegroups.com
1. I have to use the modified Blockly for my company's project.
2. Here is the output of 'npm ls blockly':

PS ---packages\blockly> npm ls blockly

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
blo...@10.0.2 ---packages\blockly
├─┬ @blockly/block...@3.1.2
│ └── blo...@9.2.0
├─┬ @blockly/dev-...@5.3.1
│ ├─┬ @blockly/theme...@4.0.10
│ │ └── blo...@9.2.0 deduped
│ ├─┬ @blockly/theme-deu...@3.0.10
│ │ └── blo...@9.2.0 deduped
│ ├─┬ @blockly/theme-hig...@3.0.10
│ │ └── blo...@9.2.0 deduped
│ ├─┬ @blockly/theme-tr...@3.0.11
│ │ └── blo...@9.2.0 deduped
│ └── blo...@9.2.0 deduped
└─┬ @blockly/theme-...@3.0.10
  └── blo...@9.2.0 deduped

3.Here is part of  my package.json file in my local Blockly Dist:
  "devDependencies": {
    "@blockly/block-test": "^3.0.0",
    "@blockly/dev-tools": "^5.0.0",
    "@blockly/theme-modern": "^3.0.0",
    "@hyperjump/json-schema": "^1.5.0",
    "@microsoft/api-documenter": "^7.22.4",
    "@microsoft/api-extractor": "^7.29.5",
    "@typescript-eslint/eslint-plugin": "^5.33.1",
    "@wdio/selenium-standalone-service": "^8.0.2",
    "async-done": "^2.0.0",
    "chai": "^4.2.0",
    "closure-calculate-chunks": "^3.0.2",
    "concurrently": "^8.0.1",
    "eslint": "^8.4.1",
    "eslint-config-google": "^0.14.0",
    "eslint-config-prettier": "^8.8.0",
    "eslint-plugin-jsdoc": "^46.2.6",
    "google-closure-compiler": "^20230502.0.0",
    "google-closure-deps": "^20230502.0.0",
    "gulp": "^4.0.2",
    "gulp-concat": "^2.6.1",
    "gulp-gzip": "^1.4.2",
    "gulp-header": "^2.0.9",
    "gulp-insert": "^0.5.0",
    "gulp-rename": "^2.0.0",
    "gulp-replace": "^1.0.0",
    "gulp-series": "^1.0.2",
    "gulp-shell": "^0.8.0",
    "gulp-sourcemaps": "^3.0.0",
    "gulp-umd": "^2.0.0",
    "http-server": "^14.0.0",
    "json5": "^2.2.0",
    "markdown-tables-to-json": "^0.1.7",
    "mocha": "^10.0.0",
    "patch-package": "^7.0.0",
    "prettier": "2.8.8",
    "readline-sync": "^1.4.10",
    "rimraf": "^5.0.0",
    "selenium-standalone": "^8.0.3",
    "typescript": "^5.0.2",
    "webdriverio": "^8.0.5",
    "yargs": "^17.2.1"
  },
  "dependencies": {
    "jsdom": "22.1.0"
  }


4. For webpack, I did not use it in my local blockly dist, but I do use it in my APP.

---AleX

'Maribeth Moffatt' via Blockly <blo...@googlegroups.com> 于2024年4月4日周四 00:46写道:

Maribeth Moffatt

unread,
Apr 9, 2024, 8:31:57 PM4/9/24
to Blockly
So what we can see from the output of `npm ls blockly` is that several of your devDependencies are using an old version of Blockly. Generally whenever you update the Blockly major version (from 9 to 10) you also need to bump any plugins to their next major versions as well. If you look at the package.json for dev-tools v5 you'll see the peer dependency there is for blockly v9. Ideally, you'd be getting a peer dependency warning since you don't meet that, but perhaps you're silencing or ignoring that warning. If you update those plugins to their latest versions, they'll all be compatible with v10.


As a side note, we would be really interested in knowing how you're customizing Blockly such that a fork or local distribution is required. We've been working hard to make sure the library is customizable without having to fork. If you shared what kind of customizations your team is making that would be really helpful for us and we might be able to add APIs you need such that that local distribution isn't necessary in the future :)

Best,
Maribeth
Reply all
Reply to author
Forward
0 new messages