Minimap Plugin Now Available

168 views
Skip to first unread message

Cesar Ades

unread,
Aug 24, 2023, 4:27:35 PM8/24/23
to Blockly
Hey everyone,

We are excited to announce the release of a new minimap plugin for Blockly! This plugin adds a minimap to a user's workspace, which can be used for better navigation. You can try it out here or include it in your own project via NPM.

As usual, there is always room for improvement, so don't hesitate to leave feedback or even send over a PR.

Best,

Cesar

Mark Friedman

unread,
Aug 24, 2023, 6:57:12 PM8/24/23
to blo...@googlegroups.com
I tried the minimap out, via the linked playground, clicked "Random Blocks" and the minimap did not seem to properly re-render.  It only showed a very small subset of the blocks.

-Mark


--
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/bafd65e8-45e7-4410-98cb-c9c20e142fd8n%40googlegroups.com.

Seb Seb

unread,
Aug 25, 2023, 5:43:35 AM8/25/23
to Blockly
Great, really useful tool.
I have just some remarks:
- at line '', VSCodium show an error: "Could not find a declaration file for module'@blockly/workspace-minimap' "
- at restart, plugin window does not refresh: I tried on yourlink, put few blocks, and if I refresh or close and reopen browser tab the white rectangle does not correspond with the window size. I hope you can understand what I try to describe...
Thanks.

Beka Westberg

unread,
Aug 30, 2023, 12:38:41 PM8/30/23
to Blockly
Hello! Sorry forgot to post back yesterday after filing issues =)

> clicked "Random Blocks" and the minimap did not seem to properly re-render.

Filed https://github.com/google/blockly-samples/issues/1879 to track this. Turns out the root cause is actually https://github.com/google/blockly/issues/7448 in core :/ But the good thing is that since the minimap is actually using our event APIs for mirroring state, we'll be more likely to catch problems with our event ordering that could also mess up real time collaboration!

> if I refresh or close and reopen browser tab the white rectangle does not correspond with the window size.

Filed https://github.com/google/blockly-samples/issues/1878 to track this. We'll probably ask Cesar if he's interested in grabbing this! Otherwise I'll give it a look =)

> VSCodium show an error: "Could not find a declaration file for module'@blockly/workspace-minimap' "

Could you provide the full stack trace of the error? It sounds like VSCodium is probably looking for a type declaration file and is having trouble finding it. But I want to double check!

Best wishes,
--Beka

Seb Seb

unread,
Aug 31, 2023, 8:48:52 AM8/31/23
to Blockly
Hi,
thanks for issues tracking, most convenient. I think you're right :
Could not find a declaration file for module '@blockly/plugin-workspace-search'. 'f:/Logiciels/Arduino_graphique/µcBlockly/node_modules/@blockly/plugin-workspace-search/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/blockly__plugin-workspace-search` if it exists or add a new declaration (.d.ts) file containing `declare module '@blockly/plugin-workspace-search';`ts(7016)

Christopher Allen

unread,
Sep 4, 2023, 7:55:44 AM9/4/23
to blo...@googlegroups.com
Hi Seb,

Thanks for the additional information.  To clarify, you earlier wrote:

- at line '', VSCodium show an error: "Could not find a declaration file for module'@blockly/workspace-minimap' "

and then in response to Beka's question followed up with:

thanks for issues tracking, most convenient. I think you're right :
Could not find a declaration file for module '@blockly/plugin-workspace-search'. 'f:/Logiciels/Arduino_graphique/µcBlockly/node_modules/@blockly/plugin-workspace-search/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/blockly__plugin-workspace-search` if it exists or add a new declaration (.d.ts) file containing `declare module '@blockly/plugin-workspace-search';`ts(7016)


Is it the case that both plugins (workspace-minimap and workspace-search) are affected in the same way?  That would make sense, as it appears that we are not publishing .d.ts files for plugins, not even the ones written in TypeScript.  I've filed issue #1892 to track doing that.

Curiously enough it looks like this is unrelated to issue #1877, though I mention it here in case it is also affecting you.


Christopher
 

Koen Van Wijk

unread,
Sep 8, 2023, 7:22:37 PM9/8/23
to Blockly
What is the expected behaviour with comments? It seems I can drag the comment arround in the minimap and it is drawn at different place.

minimap.png

Beka Westberg

unread,
Sep 11, 2023, 4:32:39 PM9/11/23
to Blockly
Hi Koen! Thanks for reporting this =)

We hadn't tested with comments, so I'm not sure what behavior we want. But I did file an issue to discuss if you have opinions!

Best wishes,
--Beka

Reply all
Reply to author
Forward
0 new messages