Skip to content

add extension: ShareSheet - #2269

Open
CreeperNewGamer wants to merge 15 commits into
TurboWarp:masterfrom
CreeperNewGamer:CreeperNewGamer-Add-Extension
Open

add extension: ShareSheet#2269
CreeperNewGamer wants to merge 15 commits into
TurboWarp:masterfrom
CreeperNewGamer:CreeperNewGamer-Add-Extension

Conversation

@CreeperNewGamer

Copy link
Copy Markdown

No description provided.

@github-actions github-actions Bot added the pr: new extension Pull requests that add a new extension label Oct 5, 2025
@CreeperNewGamer CreeperNewGamer changed the title CreeperNewGamer add extension add extension: ShareSheet Oct 5, 2025
@ampelectrecuted

ampelectrecuted commented Oct 5, 2025

Copy link
Copy Markdown
Contributor

Your image should be SVG + you need to add your extension to extensions.json (personally I would put it after close controls because both interface with the browser UI)
Also this isn't supported on Firefox desktop yet.

@CreeperNewGamer

Copy link
Copy Markdown
Author

Ok let me do this maybe later

@PPPDUD

PPPDUD commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

!format

DangoCat and others added 3 commits October 16, 2025 18:36
I didn't bother to add casting past the "setdatatourl" block
@Brackets-Coder

Copy link
Copy Markdown
Member

!format

@Brackets-Coder

Brackets-Coder commented Oct 16, 2025

Copy link
Copy Markdown
Member

@CreeperNewGamer the previous commit should fix some of your issues

In the future, always try to use Scratch.Cast and Scratch.translate where applicable.

If you want this extension to appear in the gallery, you'll need to add the relevant information to extensions.json. You can view how in the contributing guidelines.

@github-actions

This comment was marked as resolved.

@CreeperNewGamer

Copy link
Copy Markdown
Author

Oh thanks, is this helping me so much! YAY!

@CreeperNewGamer

Copy link
Copy Markdown
Author

Also can you please appear this extension on the gallery, and you also help me creating a better thumbnail!

@Brackets-Coder

Copy link
Copy Markdown
Member

Also can you please appear this extension on the gallery, and you also help me creating a better thumbnail!

I'll see what I can do, but I'm not good at graphic design.

@Brackets-Coder

Copy link
Copy Markdown
Member

I added the line to extensions.json, so your extension should appear somewhere around the middle of the gallery if this gets merged.

@CreeperNewGamer

CreeperNewGamer commented Oct 16, 2025

Copy link
Copy Markdown
Author

Can 2 peoples review this, because of this:
image

Cast.toBool doesn't exist; toBoolean does.
@PPPDUD

PPPDUD commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Your code had a bug causing the <is share sheet supported?> block to hang forever, so I fixed it for you.

@CreeperNewGamer

Copy link
Copy Markdown
Author

Your code had a bug causing the <is share sheet supported?> block to hang forever, so I fixed it for you.

Thanks

@PPPDUD

PPPDUD commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Your code had a bug causing the <is share sheet supported?> block to hang forever, so I fixed it for you.

Thanks

Happy to help!

@PPPDUD

PPPDUD commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

ShareSheet is not supported on Chromium with Ubuntu 25.04; what platforms is it supposed to work on?

@ampelectrecuted

Copy link
Copy Markdown
Contributor

ShareSheet is not supported on Chromium with Ubuntu 25.04; what platforms is it supposed to work on?

This also does not work. Tested on Arch Linux, Chromium 141.0.7390.76.

@CreeperNewGamer

Copy link
Copy Markdown
Author

But is working on iPad 7th running iPadOS 18.7, for me

@CreeperNewGamer

Copy link
Copy Markdown
Author

To answer this question "what platforms is it supposed to work on" is mobile or windows 11

@Brackets-Coder

Copy link
Copy Markdown
Member

I'm having issues to accept this, but when I figure it out then I accept it!

I'm confused.

@CreeperNewGamer

CreeperNewGamer commented Oct 17, 2025

Copy link
Copy Markdown
Author

Also, may I inquire as to why you're developing on an iPad? (it won't make your extension less favorable if it still works and passes all the checks, but it does make it harder to develop)

Sorry, but I have a time limit on my computer, so I use my iPad instead 😕!

@CreeperNewGamer

Copy link
Copy Markdown
Author

I'm having issues to accept this, but when I figure it out then I accept it!

I'm confused.

I mean the request change

@CreeperNewGamer

Copy link
Copy Markdown
Author

I did this by accident, oops
image
or I’m confused.

@Brackets-Coder

Copy link
Copy Markdown
Member

It's been a hot second sorry
I'm probably going to review this on Saturday as well, remind me please.

@Brackets-Coder Brackets-Coder self-assigned this Jan 9, 2026
@PPPDUD

PPPDUD commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

@Brackets-Coder I believe that it's Saturday now.

@Brackets-Coder

Copy link
Copy Markdown
Member

It's an unexpectedly very busy Saturday
Probably tomorrow afternoon

@Brackets-Coder Brackets-Coder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I apologize for my tardiness. Yesterday was really busy

  • I verified that the extension follows all acceptance criteria and guidelines in CONTRIBUTING.md.
  • I believe the block list is well-designed and intuitive.
  • I tested all functionality and found no bugs, security flaws, or unintuitive behavior.
  • I reviewed the code and believe it is well-written and easy to maintain or extend in the future, even without help from the original author.
  • I have no additional concerns.

"set image data to costume" block still seems to report a blank image:

"The file 'image.png' could not be opened. It may be damaged or use a file format that Preview doesn’t recognize."

Everything else looks good. Fix this and you'll get my approval. Fantastic work!

@Brackets-Coder

Brackets-Coder commented Jan 19, 2026

Copy link
Copy Markdown
Member

@CreeperNewGamer Just checking in—is there anything else I can help you with?

@Brackets-Coder

Copy link
Copy Markdown
Member

@CreeperNewGamer This PR is getting a little stale—would you like to continue working on it? There's just one fix before I approve!

@CreeperNewGamer

Copy link
Copy Markdown
Author

Yes

@Brackets-Coder

Copy link
Copy Markdown
Member

Hello @CreeperNewGamer

Just checking in on your progress. Is there anything I can help you with?

@CreeperNewGamer

Copy link
Copy Markdown
Author

I want to merge it

@Brackets-Coder

Copy link
Copy Markdown
Member

Okay, I can help make that happen, but I'll need another reviewer to help me

In the previous testing, I couldn't get "set image data to costume" to work. The file seems to have attempted to upload, but its data is corrupted. Can this be fixed before merging? Thanks

@PPPDUD

PPPDUD commented May 14, 2026

Copy link
Copy Markdown
Contributor

sigh Time to unsubscribe from this issue.

@Brackets-Coder

Brackets-Coder commented May 14, 2026

Copy link
Copy Markdown
Member

sigh Time to unsubscribe from this issue.

I'm sorry you've had an unpleasant experience :/

@GarboMuffin
GarboMuffin requested a review from a team as a code owner July 13, 2026 00:28
@CreeperNewGamer

Copy link
Copy Markdown
Author

!format

@CreeperNewGamer

Copy link
Copy Markdown
Author

On my last change I added images to blocks

@Brackets-Coder

Copy link
Copy Markdown
Member

Cool, I can help you better after I get home from work

@Brackets-Coder Brackets-Coder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • I verified that the extension follows all acceptance criteria and guidelines in CONTRIBUTING.md.
  • I believe the block list is well-designed and intuitive.
  • I tested all functionality and found no bugs, security flaws, or unintuitive behavior.
  • I reviewed the code and believe it is well-written and easy to maintain or extend in the future, even without help from the original author.
  • I have no additional concerns.

Everything looks good, just a few nitpicky things. You may want to make sure the "set data from costume" block works with SVG costumes as well. If not, you should specify that block is only for bitmap costumes and only accept bitmap costumes

Comment on lines +200 to +202
const imageFile = new File([blob], "image.png", {
type: blob.type,
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This assumes the image is a PNG?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Maybe it should detect the type of the asset

Comment on lines +212 to +233
async setdatatocostume({ COSTUME: costumeName }, util) {
const target = util.target;
const costumeIndex = target.getCostumeIndexByName(costumeName);
const costume = target.sprite.costumes[costumeIndex];
const asset = costume.asset.encodeDataURI();

this.hasError = false;
try {
const response = await Scratch.fetch(asset);
const blob = await response.blob();

const imageFile = new File([blob], "image.png", {
type: blob.type,
});

this.dataType = "image";
this.data = imageFile;
} catch (err) {
this.hasError = true;
this.errorMsg = err.message;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was only able to get this block to work with bitmap costumes. Many costumes will be vector. Either specify "set data to bitmap costume" or, better, convert the costume to bitmap before setting the data.

Comment thread extensions/GamerCreeper12/ShareSheet.js Outdated
Comment thread extensions/GamerCreeper12/ShareSheet.js Outdated
@Brackets-Coder

Copy link
Copy Markdown
Member

Thanks for contributing!

CreeperNewGamer and others added 2 commits July 21, 2026 16:44
Co-authored-by: Brackets-Coder <142950368+Brackets-Coder@users.noreply.github.com>
Comment thread extensions/GamerCreeper12/ShareSheet.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new extension Pull requests that add a new extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants