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

Add mock preview support for extensions #3200

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

shreyashsaitwal
Copy link
Contributor

@shreyashsaitwal shreyashsaitwal commented Jul 15, 2024

This PR adds support for mock previews in extensions. Changes here are based on this design document.

Documentation for extension developers can be found here.

@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

appinventor/appengine/build.xml Show resolved Hide resolved
String packageName,
MockInfo mockInfo) {
super(editor, typeName, iconImage);
Ode.CLog("MockVisibleExtension.constructor");
Copy link
Member

Choose a reason for hiding this comment

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

nit: we should remove these log statements before merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this and a bunch of others need to go.

Ode.CLog("MockVisibleExtension.initWorker");
final String assetsBasePath = "assets/external_comps/" + packageName + "/";

final Promise<String> fetchScript = fetchFileContent(assetsBasePath + mockInfo.getScript());
Copy link
Member

Choose a reason for hiding this comment

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

What if the script is missing? How are we handling that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We aren't handling that yet. Do you have any suggestions on how it should be handled?

@shreyashsaitwal shreyashsaitwal changed the title [GSoC] Mock preview support for extensions Add mock preview support for extensions Aug 21, 2024
@shreyashsaitwal shreyashsaitwal marked this pull request as ready for review August 21, 2024 14:12
@jisqyv jisqyv self-assigned this Aug 26, 2024
@jisqyv
Copy link
Member

jisqyv commented Aug 26, 2024

@AppInventorWorkerBee ok to test

@shreyashsaitwal
Copy link
Contributor Author

shreyashsaitwal commented Aug 26, 2024

An example extension with mock can be found here.

@shreyashsaitwal
Copy link
Contributor Author

@jisqyv this is ready for review.

@patryk84a
Copy link
Contributor

patryk84a commented Oct 24, 2024

Great work, as always. Is there a chance this will be included in the nb199 release?

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

Successfully merging this pull request may close these issues.

6 participants