-
Notifications
You must be signed in to change notification settings - Fork 284
Add Modals Extension #2095
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
Add Modals Extension #2095
Conversation
You'll want to do this in a separate branch so it's not in the master branch. Inside your fork of Turbowarp/extensions, you should have one branch per extension so it's easier to manage pull requests. When you're done that I might give it a review if I have time. |
I don't really understand you... I kind of did everything, entered what was needed, he wrote the code on a separate repository, in all the necessary folders. well, the code went a little wrong and the bot didn't pass, but I've changed it now. please add an extension, I tried very hard. |
I kindly ask you to restart the bot check and tell me exactly what I need to do. |
|
should I delete the folder and get the file from it, or what should I do?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
images should try to not contain any text as it is nearly impossible to translate.
everything in this extension already exists in a multitude of other extensions on the gallery so it has little to 0 chance of being merged, sorry.
aside from this run prettier
@@ -0,0 +1,72 @@ | |||
// Name: Modals | |||
// ID: htmlalert |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@@ -0,0 +1,72 @@ | |||
// Name: Modals | |||
// ID: htmlalert | |||
// Description: This extension adds modal dialog boxes. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
extensions/Scratch_craft_2/modals.js
Outdated
getInfo() { | ||
return { | ||
id: "htmlalert", | ||
name: "modals", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
{ | ||
opcode: "alertb", | ||
blockType: Scratch.BlockType.COMMAND, | ||
text: "alert [textia]", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
extensions/Scratch_craft_2/modals.js
Outdated
getInfo() { | ||
return { | ||
id: "htmlalert", | ||
name: "modals", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
{ | ||
opcode: "Confirmb", | ||
blockType: Scratch.BlockType.BOOLEAN, | ||
text: "confirm [textic]", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
{ | ||
opcode: "Promptb", | ||
blockType: Scratch.BlockType.REPORTER, | ||
text: "prompt [textip], default value: [classic]", |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
}; | ||
} | ||
alertb(args) { | ||
alert([args.textia]); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You watermarked the console logs with your username‽ What would happen if someone else cleaned up your code in the future? You would be hogging all the credit up!
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably won't be merged since it's functionality can somewhat be recreated with either existing extensions or ones in existing PRs, but I'm going to need @CubesterYT to probably take a look.
Overall add translate and follow TW best practices, also needs to be in a separate branch and not the master branch
This is just a quick skim review so let me know if I missed anything.
@@ -0,0 +1,72 @@ | |||
// Name: Modals | |||
// ID: htmlalert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to contain your username
// ID: htmlalert | |
// ID: scratchCraftHTMLAlert |
class modals { | ||
getInfo() { | ||
return { | ||
id: "htmlalert", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ID needs to match the one at the top and contain a username
id: "htmlalert", | |
id: "scratchCraftHTMLAlert", |
alertb(args) { | ||
alert([args.textia]); | ||
} | ||
Promptb(args) { | ||
return prompt([args.textip], [args.classic]); | ||
} | ||
Confirmb(args) { | ||
return confirm([args.textic]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguments should use Scratch.cast, also why are you wrapping all of them in square brackets?
images/Scratch_craft_2/modals.png
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't contain text, it can't be translated.
Co-authored-by: Brackets-Coder <[email protected]>
Yeah this PR should be closed |
https://github.com/scratch-craft-2/extensions/tree/master