Skip to content

Upgrade to Blockly v11 and respective plugin versions#3398

Merged
florian-h05 merged 5 commits intoopenhab:mainfrom
jsjames:blockly-v11
Dec 8, 2025
Merged

Upgrade to Blockly v11 and respective plugin versions#3398
florian-h05 merged 5 commits intoopenhab:mainfrom
jsjames:blockly-v11

Conversation

@jsjames
Copy link
Contributor

@jsjames jsjames commented Oct 29, 2025

Moved to v11 to address issues with '@mit-app-inventor/blockly-plugin-workspace-multiselect' in port to vue3.

@relativeci
Copy link

relativeci bot commented Oct 29, 2025

#3962 Bundle Size — 12.53MiB (+1.78%).

50c9999(current) vs 47adde1 main#3958(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Warning

Bundle introduced 4 new packages: @mit-app-inventor/blockly-plugin-workspace-multiselect, dragselect, @blockly/field-colour and one more – View changed packages

Bundle metrics  Change 3 changes Regression 1 regression
                 Current
#3962
     Baseline
#3958
No change  Initial JS 1.52MiB 1.52MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 7.05% 7.11%
No change  Chunks 619 619
No change  Assets 701 701
Change  Modules 2427(+0.5%) 2415
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
Regression  Packages 130(+3.17%) 126
No change  Duplicate Packages 1 1
Bundle size by type  Change 2 changes Regression 2 regressions
                 Current
#3962
     Baseline
#3958
Regression  JS 10.86MiB (+2.06%) 10.64MiB
Regression  CSS 845.74KiB (+0.01%) 845.64KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 45.73KiB 45.73KiB
No change  Other 847B 847B

Bundle analysis reportBranch jsjames:blockly-v11Project dashboard


Generated by RelativeCIDocumentationReport issue

@jsjames jsjames force-pushed the blockly-v11 branch 2 times, most recently from 7121969 to 7a065eb Compare October 30, 2025 20:47
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Oct 30, 2025
@florian-h05
Copy link
Contributor

As testing Blockly is always a larger effort for @stefan-hoehn, I wonder whether we shouldn't try to upgrade to Blockly 12 now, so we don't need to test twice. WDYT @jsjames?

@jsjames
Copy link
Contributor Author

jsjames commented Nov 5, 2025

As testing Blockly is always a larger effort for @stefan-hoehn, I wonder whether we shouldn't try to upgrade to Blockly 12 now, so we don't need to test twice. WDYT @jsjames?

I did try, but the plugin @mit-app-inventor/blockly-plugin-workspace-multiselect does not yet support it .

Since there is an issue with our vue3 version where multi-select does not currently work (I recall it being a runtime issue in the @mit-app-inventor/blockly-plugin-workspace-multiselect ), this was the most expedient way to address. The question is how critical is it to get the multi-select feature working?

@florian-h05
Copy link
Contributor

That’s quite unfortunate.
Looking at mit-cml/workspace-multiselect#106 & RaspberryPiFoundation/blockly#9261 it doesn’t seem the issue will be solved soon, so I guess we’ll stay with Blockly v11.

@jsjames
Copy link
Contributor Author

jsjames commented Nov 5, 2025

That’s quite unfortunate. Looking at mit-cml/workspace-multiselect#106 & google/blockly#9261 it doesn’t seem the issue will be solved soon, so I guess we’ll stay with Blockly v11.

v11 does get rid of the remaining deprecated packages warnings in package.json!

'@mit-app-inventor/blockly-plugin-workspace-multiselect' working.

Required updating of imports and making sure 'workspace' was not reactive (https://groups.google.com/g/blockly/c/myo3FXL3r_Y/m/NLgPZNc0CgAJVue3).

added support for blockly comments (add comment via context menu)

Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have now compared the code generation between this PR and 1ac744b for all tests from https://github.com/openhab/openhab-webui/tree/main/bundles/org.openhab.ui/web/test/blockly.

The generated code is identical, except for:

  • blockly_datetime_creation_comparison due to #3361
  • persistence code generation fails with:
    ReferenceError: Input "dayInfoUntil" doesn't exist on "oh_get_persistvalue"
    

This seems to be a direct consequence of:

Calling statementToCode or valueToCode on inputs that don't exist will now throw an error instead of returning an empty string.

from https://groups.google.com/g/blockly/c/Ai8C0tEiPbI?pli=1

I am working on a solution right now.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
@florian-h05 florian-h05 merged commit f6269ac into openhab:main Dec 8, 2025
5 checks passed
@florian-h05 florian-h05 added this to the 5.1 milestone Dec 8, 2025
@florian-h05 florian-h05 changed the title Moved to blockly v11 and respective plugin versions Upgrade to Blockly v11 and respective plugin versions Dec 8, 2025
@jsjames jsjames deleted the blockly-v11 branch December 8, 2025 22:04
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Dec 16, 2025
It seems when first dealing with this issue in openhab#3398 some occurences were missed, this should fix all of them.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
jsjames pushed a commit that referenced this pull request Dec 16, 2025
It seems when first dealing with this issue in #3398 some occurences
were missed, this should fix all of them.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request main ui Main UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants