Help test nb191

Hello everyone,

We have been working on a number of changes to improve App Inventor. These changes have been compiled into a version available on https://ai2-test-appinventor-mit-edu.ezproxy.canberra.edu.au. You will need Android companion 2.65t1u from the test server or you can use iOS version 2.64 or later from the App Store or TestFlight. If you encounter any bugs, please report them in this thread.

The tentative change log is as follows:

  • Features:
    • Add functional list operators like map, filter, reduce, and sort (@siyaoL1)
    • Add new math stats blocks like average, standard deviation, min/max over lists
    • Add custom font typeface support (@preetvadaliya)
    • Add new Bluetooth permissions to permission helper block
    • Add WebRTC support for iOS companion (needs iOS companion 2.64.1 or later)
    • Add "every component" block (@Vishwas-Adiga)
    • Add functions to Chart to set domain and range of charts and to fix the origin at 0, 0
  • Bug fixes:
    • Assert immutability of pending intents for compatibility with Android 12 (affects Texting)
    • Update Physicaloid library for immutable pending intent on Android 12 (affects Serial)
    • Fix Web component permission checks for reading/writing files
    • Fix File.Exists logic when testing for assets
    • Ask for dangerous Bluetooth permissions in Android 12 (affects BluetoothClient and BluetoothServer)
    • Make FinishedClearRange event run after clearing range (affects Spreadsheet)
    • Fix some naming of spreadsheet blocks to follow App Inventor conventions
    • Update spreadsheet internal data structures before calling GotSheet event
    • Fix a crash when using scatter charts with unsorted X values
    • Fix use of deprecated drag and drop APIs in Chrome
    • Refresh ChartData2D properties when Source component is changed
    • Do not show the DataSourceKey property when a Spreadsheet is a data source
    • Add missing helper block for Player's Source property (@conorshipp)
    • Handle control characters in block XML breaking projects
    • Add a missing documentation page on list concepts
    • Update some Chinese translations
    • Fix issues with null geometries in FeatureCollections
    • Fix ImageSprite image size in designer (@Himanshu2107)
    • Make split string consistent across Android versions using Java 8 semantics, i.e., no empty space when splitting by the empty string (@jingmiao-z)
    • Fix replace-all so replacement string can contain the dollar sign (@XomaDev)
    • Fix Spreadsheet.GotRows returning 0-indexed values instead of 1-indexed values (@dhruvpatidar359)
    • Fix a typeblocking issue introduced by functional blocks
  • Internal changes:
    • Reimplement component descriptor generator using JSONObject
    • Use glob matching to handle proguarding of extensions
    • Implement a PermissionConstraint annotation for components and extensions
    • Prevent unintended command execution in buildtools
    • Update documentation copyright year to 2023
    • Refactor YaClientApp and devmode to use a shared classpath
    • Update to using Google Analytics 4
    • ai2-test now served exclusively with HTTPS
7 Likes

Known issues:

  • Projects with certain Spreadsheet events like GotFilterResults do not properly rename their lexical variable references (fix pending review)
  • all but first does not return a proper list when given a list of one item (fix merged, pending update of ai2-test)
  • string-split does not respect the empty string rule (fix pending review)

Exhausted just reading the list.....

The Table of Contents at
https://ai2-test-appinventor-mit-edu.ezproxy.canberra.edu.au/reference/blocks/lists.html#sortwithkey
refers to that entry as * sort list with proxy values

I would add (keys) to the description, to associate the two concepts (keys and proxy values.)

(P.S. That entire block family is wonderful.)

Thanks for pointing that out as the documentation could be more clear. I'll ask some folks on our end to review and make suggestions on how it could be better worded.

I looked in Designer attributes for

  • Button
  • Label
  • List Picker
  • ListView
    and could not find any references to custom fonts.

Hint?

The FontTypeface property now is a dropdown and allows for uploading .ttf fonts beyond the previously supported options.

Now I see the upload option after the category list.
Familiarity with the four options blinded me to the new upload option under the category list.
Now I know where to put my WingDings.

1 Like

P.S. I would have added a fifth option to the 4 categories of font family, Custom .ttf , that would have popped up a modal file request.

My lazy attention focus totally missed the surrounding upload option, and had no clue that it was for .ttf files (any other types?)

That I do not know. I imagine that it is any font format supported by Android (possibly different depending on Android version). @preetvadaliya might be able to expand on that.

I was able to successfully load a .TTF file after copying it from my C:\Windows\Fonts directory.

The Windows Fonts folder has plenty of fonts, so I would not bother looking for more.

A direct upload was forbidden by Windows, but I was able to copy the .TTF file from that folder to my desktop, where my browser upload succeeded.

Preview in Ai2 worked, along with Companion testing.

  • Add "every component" block (@Vishwas-Adiga)

I was finally able to generate one of these by Typeblocking, but now I have no idea what to do with it.
component_all_component_block

Edit - in retrospect, I suppose it could be used as a component type checker, using IS IN LIST. Still thinking of a case for that.

...except you need a license from Microsoft to use any of their fonts (probably the same for any big names in the font business, Apple springs to mind).

costly too.

It would be worth mentioning in the Documentation that you cannot simply copy a font from your computer to your App Inventor Project without buying a license.

It is useful together with the advanced blocks...
Currently we have to create a list, which contains all for example checkbox components... now we can use that new block instead...

In the example below replace the list by every Checkbox App Inventor Tutorials and Examples: Checkbox | Pura Vida Apps

Taifun

1 Like

:frowning_face:
As usual, I can not use this ai2-test server and ai2 server, since the google account problem. We in China can not use google server.
Is there other way to log in the server with no google account?

Yes, you can go to login.appinventor.edu/login. You can then setup an account using any email address.

1 Like

Thanks jis, now I can login with any email. :slight_smile:

1 Like

image
empty string still there

1 Like



better to rename this two as first (or last) value in the list

I've used @Taifun's sample code pattern with generic blocks in several projects already.

However, the every block would fail me if I had more than one radio button (list of checkboxes) or if I was dealing with components lined up in rows and columns, where enumerating the components in lists was needed to establish context (row and column number) working backwards from a component, using the INDEX IN LIST block.

Maybe an EVERY COMPONENT in CONTAINER block would be more useful for cases more complex than single radio button samples.

1 Like