Commit graph

298 commits

Author SHA1 Message Date
chrisgarrity
272780768b
Update CONTRIBUTING.md 2020-06-16 15:33:17 -04:00
chrisgarrity
ffd1172d67
Merge pull request #270 from LLK/fix-ios-import
Fix ios import
2020-05-01 07:42:29 -04:00
Chris Garrity
be9efb1e83 Fix mismatched file types 2020-05-01 07:41:09 -04:00
chrisgarrity
31e9cb5bc2
Merge pull request #264 from chrisgarrity/fix-manifest
Avoid concatenation in AndroidManifest
2020-04-21 09:57:01 -04:00
Chris Garrity
ec9387115f Avoid concatenation in AndroidManifest
Trying to use the extension pattern this way gets an error when uploading the APK to Google Play, so just hard code the extension patters. This won’t work for PBS kids version.
2020-04-21 09:52:42 -04:00
chrisgarrity
fe2ad22efb
Merge pull request #259 from chrisgarrity/content-import-fix
Don’t export as email message, and be less strict about import requirements
2020-04-21 07:53:32 -04:00
Chris Garrity
1e3d468c33 Don’t export as email message, and be less strict about import requirements
Don’t export as email message. and be less strict about import requirements.

Android intent filters are really only designed to work with standard mimetypes (like ‘image/png’). Even if you can share something with a custom mime type, it’s likely to get lost somewhere along the way, from email, or Gdrive, or Files app etc.

Path matching patterns in intent filter only apply to `file` schemes, `content` scheme is likely to be some generated id in temp storage. `content` filters maintly go by mimetype, but as noted above, a custom mimetype has often gone AWOL. Generic application files are usually downloaded as `application/octet-stream`. Basically we have to trust the user not to try to load some other random file into ScratchJr. The import function will fail and give an error message if they do.

Finally, fix the way we’re sharing ScratchJr files. While the button says ‘Share by Email’ for a long time Android has shown a selection of ways to share the file. However, we were setting the mime type as an email message so the saved file would always try to open in an email client instead of ScratchJr.
2020-04-13 17:07:38 -04:00
chrisgarrity
098b2dc68a
Merge pull request #255 from LLK/require-touchscreen
Require touchscreen in the Android manifest
2020-04-07 15:09:06 -04:00
Chris Garrity
16ee3f9213 Require touchscreen in the Android manifest
Fixes #233
2020-04-07 15:06:08 -04:00
chrisgarrity
bca5f433ae
Merge pull request #206 from beskrovnykh/develop
Fix can't import .sjr
2020-04-07 15:00:10 -04:00
Chris Garrity
9a12f98cf9 Add checks for filetype, skip unnecessary FileIO
This PR was 95% of the way there, and I didn’t want to ask for changes after not getting to review it for so long, so I just made the changes.

Thanks for submitting!
2020-04-07 14:56:26 -04:00
chrisgarrity
3c80bb2f81
Merge pull request #247 from yueyuzhao/dev-fix-ios-whole-window-scroll
iOS: disable UIWebView scroll to fix #243
2020-04-02 09:58:30 -04:00
chrisgarrity
a50e7943fa
Merge pull request #249 from LLK/document-analytics
Improve setup documentation and ergonomics
2020-04-01 09:16:31 -04:00
Donald
d56ff035b0 fix library not scrolling 2020-03-31 07:40:26 +08:00
Chris Garrity
20e0303b68 Address comments
Use correct (and consisten) capitalization for ‘Xcode’.

Clarify that Firebase generates config files.
2020-03-30 11:27:15 -04:00
Chris Garrity
7f1f966984 Improve Analytics setup documentation
Added instructions to the README for how to get the google services configuration files for analytics. Removed (and ignored in future) the empty config files. Note: empty folders are ignored in git, so added an empty file `.exist` to the android folder so that it will be there as a place to hold the actual google services file.

Finally added the xCode scheme for the app that you need for newer versions of xCode.
2020-03-24 17:39:06 -04:00
Donald
9bb886e9a8 iOS: disable UIWebView scroll to fix #243 2020-03-24 21:00:09 +08:00
chrisgarrity
09fbe4cfed
Merge pull request #242 from LLK/fix-window-scroll-217
Change touchmove handling in editor to prevent scrolling whole window on iOS
2020-03-23 15:28:34 -04:00
Benjamin Wheeler
3b8301e16b
Merge pull request #244 from benjiwheeler/readme-steps-ios-android
In README, reorganized android and ios setup steps
2020-03-23 12:24:24 -04:00
Ben Wheeler
67043fdb54 reorganized android and ios setup steps 2020-03-23 12:14:24 -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
chrisgarrity
c1a025dd97
Merge pull request #236 from LLK/fix-debugging
Fix debugging
2020-01-16 08:55:51 -05:00
Chris Garrity
0a580324bf FIx. debugging 2020-01-16 08:49:59 -05:00
chrisgarrity
ceb4f2ad7f
Merge pull request #234 from LLK/fix-scale
Fix Android scaling
2020-01-15 16:20:41 -05: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
chrisgarrity
4347cac225
Merge pull request #229 from LLK/translations
Update translations
2019-10-31 14:48:52 -04:00
Chris Garrity
e95a3b27e8 Update translations 2019-10-31 14:47:53 -04:00
chrisgarrity
e925c1beab
Merge pull request #227 from LLK/revert-ios-scroll
revert ios scroll fix
2019-10-31 13:14:57 -04: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
chrisgarrity
64c5575bda
Merge pull request #224 from LLK/revert-android-paint
Revert paint change for android
2019-10-31 08:08:24 -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
chrisgarrity
a5686e9111
Merge pull request #221 from LLK/ios-scroll-bug
Fixes the iOS scrolling problem
2019-10-25 16:24:59 -04:00
Chris Garrity
d71df52d6b Don’t allow overscroll
The iOS change seems to have a side effect on Android of adding  an“Edge Effect” to the web view whenever dragging a block. (Edge effects are the grey curved shadow that appears at the top or bottom of a container when you overscroll. When you drag a block they appear at the top or bottom of the screen)

Adding the `android:overScrollMode=“never”` attribute to the webview means the edge effect doesn’t appear.
2019-10-25 16:19:41 -04:00
Chris Garrity
d97d075959 Check in empty Firebase configuration 2019-10-25 15:30:38 -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
chrisgarrity
3fed0ede1a Update README.md 2019-10-25 12:46:11 -04:00
chrisgarrity
3dba10580b
Merge pull request #220 from LLK/firebase-analytics
Firebase analytics
2019-10-25 12:38:40 -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
chrisgarrity
a55c231ce1
Update README.md 2019-10-21 13:03:41 -04:00
Chris Garrity
1ba161e3b1 Update iOS to use Firebase Analytics 2019-10-21 13:00:37 -04:00
Chris Garrity
f885202c8e Update Cocoapods to use Firebase
I also decided to add the Pods directory to gitignore. It bloats the ScratchJr repo. This does mean that people will need to install cocoapods and run `pod install` the first time they build scratchjr.
2019-10-21 12:58:36 -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
Chris Garrity
1be3feb791 ensure ‘switchToFree’ gets run before generating PNGs
The assemble.depends on doens’t seem to ensure that the correct sources are copied to the HTML5 directory
2019-10-18 10:55:27 -04:00
chrisgarrity
564dc296d3
Merge pull request #219 from LLK/updateGradle5
Update gradle5
2019-10-18 08:36:13 -04:00
Chris Garrity
63112f4ca8 Add files to gitignore 2019-09-25 13:36:21 +01:00
DD Liu
57bcffea6c Update to gradle 5 and update support dependencies 2019-09-09 16:15:24 -04:00
chrisgarrity
743f1974c5
Merge pull request #212 from chrisgarrity/hide-parents-button
Hide parents button after succesful parental gate
2019-04-23 08:06:58 -04:00