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

Implement multiple .blocks files #10191

Open
THEb0nny opened this issue Sep 17, 2024 · 3 comments
Open

Implement multiple .blocks files #10191

THEb0nny opened this issue Sep 17, 2024 · 3 comments

Comments

@THEb0nny
Copy link
Contributor

Is it possible to implement several .blocks files? For example, to avoid cluttering one file with code blocks, as is done now?
I think this is needed for large projects, where it becomes difficult to find code blocks.
For example, you know Scratch, in which each sprite has its own code space. The problem is less exposed there.
For each file, a separate ts or py file would be created. And in .menubar .editortoggle .blocks-menuitem it would be possible to select the desired file from the dropdown menu.

How do you feel about such a proposal and is it possible to implement it?

@riknoll
Copy link
Member

riknoll commented Oct 9, 2024

this is a tricky problem to solve, but one that i think about occasionally as i too would love to have this feature for a few reasons.

the main issue is determining what communication between blocks files looks like. all variables in blocks are global, so do we expose all variables/functions in every file? do we want to do some sort of import/export module mechanism?

the other issue is that i believe the current codebase has a lot of assumptions about their being one blocks file in the project. would be tedious to fix

@THEb0nny
Copy link
Contributor Author

THEb0nny commented Oct 12, 2024

@riknoll if you look at the scratch, then when creating a variable, you can choose a global variable or local (for sprite), does it seem to me adequate logic?

Maybe this opportunity should go to a large release.

@riknoll
Copy link
Member

riknoll commented Oct 15, 2024

i think we would need to conduct some user studies to determine what the appropriate mental model should be for this. i do like how scratch does it, but i want to make sure we're using terminology that is easy to understand and UI that clearly differentiates the two types of variables.

in any case, i think this is probably a low priority for us right now (much as it pains me) because the vast majority of our users aren't creating projects complex enough to warrant multiple files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants