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

Verify code demo will not be impacted by moving blocks to plugins #7826

Closed
cpcallen opened this issue Feb 2, 2024 · 6 comments · Fixed by #7973
Closed

Verify code demo will not be impacted by moving blocks to plugins #7826

cpcallen opened this issue Feb 2, 2024 · 6 comments · Fixed by #7973
Assignees
Labels
component: demos issue: bug Describes why the code or behaviour is wrong

Comments

@cpcallen
Copy link
Contributor

cpcallen commented Feb 2, 2024

The storage demo in demos/storage was created to demonstrate how to save and load Blockly programs from a web app, but is known to be used by members of the public as a way to provide a URL that will load a particular Blockly program.

As we are planning to delete some of the current blocks from this repository after moving them to the blockly-samples repository (see also #7226), this has the potential to result in some of the saved Blockly programs in the storage backend becoming un-loadable.

A quick look at the demos/storage/index.html suggests that this demo has provided only a very limited toolbox, and it does not appear that any of the provided blocks are on the to-delete list, but it would be worth verifying what blocks are actually used in stored programs, since programs may have been created with blocks not currently provided in the toolbox but still present (until now) in the block definitions in blocks/.

@NeilFraser may be able to assist with auditing the contents of the storage backend.

@cpcallen cpcallen added issue: bug Describes why the code or behaviour is wrong component: demos labels Feb 2, 2024
@NeilFraser NeilFraser changed the title Verify storage demo will not be impacted by moving blocks to plugins Verify code demo will not be impacted by moving blocks to plugins Mar 19, 2024
@NeilFraser
Copy link
Contributor

After talking with Chris, we agreed that this bug is about the Code Demo, not the Storage Demo. Storage Demo is unaffected.

Yes, the Code Demo will be affected as it has colour blocks. That said, the colour blocks are useless in the code demo since there is not graphical output. The only I/O is prompt and alert.

Rather than adding the colour picker, I vote we just delete the 'Colour' category from the Code Demo. Loading saved programs with those blocks will fail. Do we want to invest time in auditing the database to see how many such programs exist?

@BeksOmega BeksOmega added the issue: triage Issues awaiting triage by a Blockly team member label Mar 19, 2024
@rachel-fenichel
Copy link
Collaborator

We know it gets used for sharing code, and it has code generation as well. If you don't want to audit the database, you could also just update the demo to pull in the blocks and field from the plugin (when published).

@maribethb maribethb removed the issue: triage Issues awaiting triage by a Blockly team member label Mar 27, 2024
@rachel-fenichel
Copy link
Collaborator

If there are any uses at all, we want to keep them working. Your choice whether that means you think it's worth auditing the database or just implementing #7938 but the only count that would lead to removing the blocks is zero uses.

@NeilFraser
Copy link
Contributor

I've pulled down 10,135 programs saved by the code demo (after filtering out the Block Factory which shares the same database). Of these, exactly 100 use colour blocks. I've individually loaded each one, and every one is a garbage program. Here are some samples:

Screenshot 2024-03-28 at 23 40 00 Screenshot 2024-03-28 at 23 39 44 Screenshot 2024-03-28 at 23 39 26 Screenshot 2024-03-28 at 23 39 00 Screenshot 2024-03-28 at 23 37 50 Screenshot 2024-03-28 at 23 36 23 Screenshot 2024-03-28 at 23 35 09

@NeilFraser
Copy link
Contributor

BTW, does anyone know if this issue affects our "Try it" demo at https://developers.google.com/blockly

If so, deleting the colour category is even easier since there's no save database. Note that this demo also has multiline text fields.

@rachel-fenichel
Copy link
Collaborator

Good point. Can you clean the colour and multiline text blocks out of that as well?

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

Successfully merging a pull request may close this issue.

5 participants