Commit graph

160 commits

Author SHA1 Message Date
Yueyu
fa6bf47b35 lint 2021-05-28 08:26:53 +08:00
Yueyu
cc7b6ee883 don't save project if project not changed 2021-05-28 08:26:37 +08:00
Yueyu
064ee0cf48 fix story saving for PBS 2021-05-27 05:18:02 +08:00
chrisgarrity
f517e0488a
Merge pull request #377 from yueyuzhao/issue/334-fix-ios-callout
disable drag & drop on images
2021-05-25 11:36:21 -04:00
chrisgarrity
cb39b8010d
Merge pull request #419 from yueyuzhao/dev-hide-gears-on-init-options-page
hide gears on init options page
2021-05-25 10:04:12 -04:00
chrisgarrity
70c89eee68
Merge pull request #424 from yueyuzhao/issue/423-touch-to-click
touch to click on init options page
2021-05-25 09:56:08 -04:00
Yueyu
267d09bc87 clean up 2021-05-13 19:39:03 +08:00
Yueyu
ec18d1ff92 touch to click on init options page 2021-05-13 19:33:38 +08:00
Yueyu
3293e506ca set column-count by optionNum 2021-05-13 18:47:56 +08:00
Yueyu
02d3035057 hide gears on init options page 2021-05-13 07:08:01 +08:00
Yueyu
86665ae8a4 1. iOS: refactor to import in IO.m and comments to Database.m
2. Android: clean up
3. JavaScript: lint code style
2021-04-30 21:20:51 +08:00
Yueyu
7b70938394 Javascript: remove jszip 2021-04-09 21:56:08 +08:00
Yueyu
2af8f82276 clean up 2021-04-09 13:22:46 +08:00
Yueyu
468bc4e0ab iOS: clean up import project and make thumbnails for sprites and backgrounds 2021-04-09 07:02:35 +08:00
Yueyu
397ce34148 iOS: native receive project 2021-04-05 08:09:32 +08:00
Yueyu
07ce9bf7c8 switch zip to native 2020-11-13 08:11:38 +08:00
Yueyu
db3821488d disable drag & drop on images 2020-11-09 21:25:27 +08:00
Ben Wheeler
664abf561a change block deletion overlap threshold from .66 to .4 2020-10-05 10:35:25 -04:00
Benjamin Wheeler
ddcd876694
Merge pull request #316 from LLK/fix-buzz-on-missing-settings
fix buzz bug when initialOptions missing from settings
2020-09-14 10:45:27 -04:00
chrisgarrity
1b51c43c41
Merge pull request #291 from LLK/issue/274-wkwebview-rebase
Issue/274 wkwebview rebase
2020-09-14 10:28:52 -04:00
Ben Wheeler
d573a011c6 fix buzz bug when initialOptions missing from settings 2020-09-09 11:17:57 -04:00
Chris Garrity
45b06ee8a6 asset saving patch
many thanks @yueyuzhao
2020-09-02 13:31:09 -04:00
Ben Wheeler
19cb492116 localize initial options, set analytics prefs every time 2020-08-20 14:23:43 -04:00
Ben Wheeler
64019e6fd8 fix to showing/hiding logo 2020-08-19 10:25:47 -04:00
Chris Garrity
6c737f51b8 [WIP] Initial version with WKWebView
Upgrade webview to WKWebView with many thanks to @yueyuzhao

* Need to debug a problem saving thumbnails on iOS 9.3.5
* Needs much more testing
2020-08-17 10:37:14 -04:00
Ben Wheeler
62a651369f add support for custom options questions at app start; refactor index.js 2020-08-14 16:52:23 -04:00
Ben Wheeler
dcd4222b4c Move json stringify and parsing into interface 2020-08-14 12:14:20 -04:00
Ben Wheeler
c301a1090e add generic setAnalyticsPref functions for iOS and Android 2020-08-13 18:24:25 -04:00
Chris Garrity
dd1f48f5e3 Remove dead code for real
removing dead code that was just commented in the previous commit,
2020-08-10 16:07:14 -04:00
Chris Garrity
1420a5947a Split iOS and Android interfaces
Refactor the native interface in preparation for switching iOS to use WKWebview.
* Finally rename the folder for device specific interfaces as `tablet` instead of `iPad`
* Update `import` statements to use the new name
* Create new `iOS.js` and `Android.js` based on previous `iPad/iOS.js` to separate the interfaces
* Add new `OS.js` class to manage the class variables, initialize the device interface delegate methods to the correct interface.
* refactor how  `utils/lib` detects the current platform based on `navigtor.userAgent` based on https://stackoverflow.com/questions/37591279/detect-if-user-is-using-webview-for-android-ios-or-a-regular-browser. previous method relied on the Android interface being loaded or not. It can be difficult to detect the difference between in a browser and in a webview, but for now ScratchJr doesn’t need to worry about running in a browser
2020-08-10 09:11:47 -04:00
Chris Garrity
0a91deec86 update new_block event 2020-07-07 09:09:14 -04:00
Ben Wheeler
abd8a1bb86 added project_editor_open and _close analytics events 2020-04-20 15:18:14 -04:00
Ben Wheeler
2762cdf271 refactor toggleGrid to be clearer, only send analytics in response to user action 2020-04-20 13:40:45 -04:00
Ben Wheeler
caa7aed291 log more events to analytics 2020-04-13 22:18:59 -04:00
Chris Garrity
b4fdd3c775 Change touchmove handling in editor to prevent scrolling whole window on iOS
Fixes #217

Testing:
- verify still works on Android
- check anywhere that could scroll:
  - character or backdrop library
  - projects in lobby
  - help documentation
  - blocks pallette
  -
2020-03-10 11:57:17 -04:00
Chris Garrity
f6dbdd4fe7 Fix Android scaling
On some newer android devices the screen tranform matrix already includes the current scale. i.e. the matrix looks like:
```
{
    a: scaleX,
    b: 0,
    c: 0,
    d: scaleY,
    e: offsetX,
    f: offsetY
}
```
where both `scaleX`, and `scaleY` are the current zoom. On other devices the scale is always `1`, and we need to apply our own scaling.

I also added the code to automatically allow webview debgging if the buildType is debuggable.  Also, note that you can switch which line is commented out in bundle-compile.sh to get unobfuscated javascript.
2020-01-15 08:42:11 -05:00
Chris Garrity
8914c15493 revert ios scroll fix
The ‘fix’ for the ios scrolling bug prevented scrolling of the library. Things need to be refactored.
2019-10-31 13:04:37 -04:00
Chris Garrity
abc78daca6 Revert paint change for android
This didn’t fix the paint issue, just changed which kind of devices see the problem. Reverted the change to work for cheaper, regular density tablets.
2019-10-31 07:48:58 -04:00
Chris Garrity
5a5e5bdf12 remove duplicate ontouchmove 2019-10-25 13:49:31 -04:00
Chris Garrity
c4ea194df7 Fix scrolling while dragging
This is the fix from Paula for #217

based on the firebase-analytics branch, so only merge after that PR (or cherry pick this commit)
2019-10-25 12:46:11 -04:00
Chris Garrity
c8f655447a Address comments 2019-10-25 12:27:32 -04:00
Chris Garrity
2c4520e9e1 improve paint_editor event
There was only one paint editor event and it only distig,nuished between character or background. This change distinguishes between editing a background from the library vs user-created. For characters it distinguishes between new and edit, and between library assets or user-created.
2019-10-23 08:58:53 -04:00
Chris Garrity
b6a1569438 Fix analytics issues
* Pass value `0` for email analytics event (everything was being reported as airdrop even when it was email)
* Use `id` for assets (corresponds to the asset file name, e.g. Star.svg) instead of `fieldname` which is localized.
2019-10-22 15:55:55 -04:00
Chris Garrity
b965440709 Switch to firebase analytics
* Remove ScratchJrApplication class - it was only being used to initialize the old Google Analytics.
* Change AppUsage (home, school, other, noanswer) from being a prefix on `label` to being a Firebase user property.
* Set the user property when loading the index page - it shouldn’t change for the rest of the session.
2019-10-21 10:48:03 -04:00
chrisgarrity
cd2503768e Hide parents button after succesful parental gate 2019-04-22 10:40:48 -04:00
chrisgarrity
32f7f5174d
Merge pull request #210 from chrisgarrity/feature/revised-share-flow
Move the parental gate before the share buttons
2019-04-16 11:35:54 -04:00
chrisgarrity
49d8b5a3df Move the parental gate before the share buttons
Change the share flow to have a ‘For Parents’ button that brings up the Parental Gate. Share buttons only become visible after a successful challenge.
2019-04-06 16:44:37 -04:00
Donald
b8109b8a8f expose scratchjr to global 2018-11-02 20:23:32 +08:00
chrisgarrity
2da0c818bf
Merge pull request #192 from Murkantilism/develop
Replaced hardcoded value of 136 with a variable.
2018-10-29 09:05:17 -04:00
Deniz Ozkaynak
ae0d60cb43
Replaced hardcoded value of 136 with a variable. 2018-10-13 20:36:29 -04:00