-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
14871ff
to
a0abae4
Compare
a0abae4
to
ea3cd91
Compare
Co-authored-by: Diego Barreiro Perez <[email protected]>
Co-authored-by: Diego Barreiro Perez <[email protected]>
...tor/appengine/src/com/google/appinventor/client/editor/simple/components/MockButtonBase.java
Show resolved
Hide resolved
...ntor/appengine/src/com/google/appinventor/client/editor/simple/components/MockComponent.java
Show resolved
Hide resolved
String packageName, | ||
MockInfo mockInfo) { | ||
super(editor, typeName, iconImage); | ||
Ode.CLog("MockVisibleExtension.constructor"); |
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.
nit: we should remove these log statements before merging.
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.
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()); |
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.
What if the script is missing? How are we handling that case?
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.
We aren't handling that yet. Do you have any suggestions on how it should be handled?
...pengine/src/com/google/appinventor/client/editor/simple/components/MockVisibleExtension.java
Show resolved
Hide resolved
...pengine/src/com/google/appinventor/client/editor/simple/components/MockVisibleExtension.java
Outdated
Show resolved
Hide resolved
...pengine/src/com/google/appinventor/client/editor/simple/components/MockVisibleExtension.java
Show resolved
Hide resolved
...ngine/src/com/google/appinventor/client/editor/simple/palette/SimpleComponentDescriptor.java
Outdated
Show resolved
Hide resolved
appinventor/appengine/src/com/google/appinventor/client/utils/jstypes/WorkerOptions.java
Outdated
Show resolved
Hide resolved
@AppInventorWorkerBee ok to test |
An example extension with mock can be found here. |
@jisqyv this is ready for review. |
Great work, as always. Is there a chance this will be included in the nb199 release? |
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.