Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't re-enable "disabled orphaned blocks" after migration to v11 #8310

Closed
1 task done
clementcontet opened this issue Jul 11, 2024 · 2 comments · Fixed by #8354
Closed
1 task done

Can't re-enable "disabled orphaned blocks" after migration to v11 #8310

clementcontet opened this issue Jul 11, 2024 · 2 comments · Fixed by #8354
Assignees
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@clementcontet
Copy link
Contributor

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

My app disable automatically blocks that are orphaned (through workspace.addChangeListener(Events.disableOrphans)), and it is the only way to disable blocks (I have options.disable = false).

When loading a workspace that have been generated with v10, v11 automatically set the disabledReasons to MANUALLY_DISABLED (see #8095), but the users can't re-enable them (because of the options.disable = false).

I can't see a good solution to this issue :(

Reproduction steps

No response

Stack trace

No response

Screenshots

No response

Browsers

No response

@clementcontet clementcontet added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Jul 11, 2024
@johnnesky
Copy link
Member

Ah, I hadn't considered this case, thanks for the bug report!

I talked with Beka and she suggested that the https://www.npmjs.com/package/@blockly/disable-top-blocks plugin might help unblock your users. If you allow disabling in the workspace and add this plugin, users will be able to use the right-click context menu to enable and disable blocks but only when they're not currently orphaned.

Otherwise, you can wait for me to implement a workaround. I think that when any disabled reason is removed, and the workspace is configured to not allow manually disabling/enabling, and the block is currently marked as manually disabled, then the manually disabled reason should be removed in addition to the reason that initiated the change.

@BeksOmega BeksOmega removed the issue: triage Issues awaiting triage by a Blockly team member label Jul 12, 2024
@clementcontet
Copy link
Contributor Author

Hi, thanks for the investigation and quick fix!
I'll wait for the next release 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants