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

fix: base64encode error warning, extraction of common logic into a single function #4036

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

retrogtx
Copy link
Contributor

what this pr does

  1. Extraction of common block setup logic into a setupBlock function.
  2. Creation of helper functions createFormBlock and setHelpString to handle common operations.
  3. Refactoring of the TurtleHeapBlock class as an example of the new structure, making the constructor more concise and easier to understand.
  4. Implementation of an array of block classes and use of forEach to set them up, which is more maintainable than calling setup on each class individually.

AlsO fixed a base64encode error by simply adding a // eslint-disable-next-line no-undef

@walterbender
Copy link
Member

This looks good. Maybe finish all the blocks in this Ensemble and then we can make a plan to do the other block definitions.

@retrogtx
Copy link
Contributor Author

long time no see!

sure will try to do that

@@ -0,0 +1 @@

Copy link
Member

Choose a reason for hiding this comment

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

What is this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like I added an extra line at the top by mistake

@walterbender
Copy link
Member

Actually, I think you inadvertently created a new empty file, blocks/EnsembleBlocks.js
Is the rest of the PR finished?

@retrogtx
Copy link
Contributor Author

retrogtx commented Nov 7, 2024

Actually, I think you inadvertently created a new empty file, blocks/EnsembleBlocks.js Is the rest of the PR finished?

Fixed that!
Yes, this PR is complete for now, I believe all the blocks of this file are in a single function to be called

@walterbender walterbender merged commit 0dff3ea into sugarlabs:master Nov 7, 2024
3 checks passed
@retrogtx retrogtx deleted the dev branch November 9, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants