New in version 0.33.0

Released 10 months ago

Please remember to uno clean your projects after upgrading Fuse.

Highlights

  • Lots of Observable API improvements & cleanup
  • Performance improvements for native controls on Android
  • Low-level refactoring to enable A Brighter Future. Check this out if you write a lot of Uno code.
Native UI
  • Android: Improved the way fuse manages the native controls when using <NativeViewHost />. This resulted in big performance improvement in complex native UIs.
  • iOS: Fixed issue where autoscrolling in <TextView TextWrapping="Wrap" /> could misbehave if the TextView was in a Panel that let its size grow (like StackPanel)
Draggable
  • Added Axis constraint to Draggable, allowing draggable behaviors locked to single axes if needed.
BusyTask/WhileFailed
  • BusyTaskActivity.All has been removed, there is now a Common which covers the same tasks and a Any which covers all possible tasks.
  • Changed WhileFailed to be part of the BusyTask system. The biggest difference is that it will detect failures of any descendent elements, not just where it was used. This is unlikely to cause a behavioural change in most projects, but if you need the old matching use Match="Parent".
  • Removed the WhileFailed.Message resource. Add an error handler directly to the resource (such as ImageSource) if the error message is needed.
  • Data bindings now mark a node as failed if the observable produces an error, or the value cannot be property converted. WhileFailed will detect this failure.
  • Added the Busy behavior to help marking nodes as busy
  • Deprecated FuseJS/BusyTask, use the Busy behavior instead
TextInput
  • Fixed an issue about certain text changes not propagating correctly
Observable
  • Added Observable.mapTwoWay: a two-way version of map
  • Added Observable.pickTwoWay: a two-way version of pick
  • Added Observable.innerTwoWay: a two-way version of inner
  • Fixed numerous issues with .inner(), however, if you relied on one of the abnormal behaviours it might be problematic. To assist in migration you can use .innerDeprecated() temporarily, which is the old way of doing .inner() (it will be removed eventually). .setInnerValue is also no longer available on .inner() (but still exists on .innerDeprecated), using a.innerTwoWay` and assigning a value is the new approach.
  • Deprecated .inner().twoWayMap() as it has numerous issues. The replacement is to use .innerTwoWay(), possibly combined with .mapTwoWay() which has a well defined behaviour.
  • Deprecated .beginSubscriptions and .endSubscriptions interface. These had issues that couldn't be resolved via this interface. If this causes any issues with your code then please get in touch and we'll work something out.
  • Added failedMap and isFailed to help track failure conditions
  • Failed Observables now lose any previous value. This was inconsistent before, sometimes they retained a value.
  • Failed Observables will clear the binding correctly now (for {Clear name} bindings)
  • Fixed a defect where onValueChanged would not respond to all changes
  • Fixed clearing of bindings when assigning an undefined value
  • Fixed forwarding of failed state in combine, combineLatest, and combineArrays
  • Fixed clearing of state if input undefined in combineLatest
StateGroup
  • State.On has been removed. This value should not have been public as it did not reflect a usable value, and could corrupt the current state. Use .Goto to goto the current state and StateGroup.Active to get, or set, the state.
WebView
  • Added ZoomEnabled attribute, defaulting to "true". In the past, zoom gestures were enabled by default on iOS but disabled on Android due to an oversight. This unifies the end-user experience.
  • Made Android WebView respect viewport tag and load content in overview mode to comply better with the iOS behavior.
CameraRoll
  • We now catch exceptions that occur during processing of a selected picture in the iOS CameraRoll. In the past this could result in orphaned promises.
Completed
  • Added Completed trigger that pulses when a node is no longer busy
Xcode project generation
  • Added $(inherited) to the framework search paths, which is sometimes necessary when using CocoaPods.

Low-level changes

The following changes are only relevant if your project contains low-level Uno code or foreign code.

Uno.Threading

As mentioned in the changelog for Fuse 0.32, the following obsolete methods have been removed:

  • AutoResetEvent.Create()
  • ManualResetEvent.Create()
  • Mutex.Create()
  • Mutex.Lock()
  • Mutex.TryLock()
  • Mutex.Unlock()
  • Semaphore.Create()
  • Thread.Create()
  • Thread.Join(int)

If you still haven't updated your code to to match, you'll now get build-errors. See the changelog for Fuse 0.32 for upgrade instructions.

In addition, EventWaitHandle has been added as a base-class for AutoResetEvent and ManualResetEvent, and ConcurrentCueue no longer implements IDisposable, both similar to what .NET does.

Uno.Net.Sockets
  • Socket.Send(byte[], int, int) has been marked as obsolete. It doesn't exist (nor work) on .NET-targets. Use Socket.Send(byte[], int, int, SocketFlags) instead.
  • Socket.Receive(byte[], int, int) has been marked as obsolete. It doesn't exist (nor work) on .NET-targets. Use Socket.Receive(byte[], int, int, SocketFlags) instead.
Uno Refactor

A large amount of refactoring has been undertaken to solve two issue:

  • Enabling testing without GL
  • Moving the root-view code to fuselibs

This series of changes are seen as steps to enable where we want to go, we understand that things can feel a bit in-cohesive at this stage. But with these changes landed we will be able to iterate on the code bases more easily and fix some long standing issues (especially in areas such as system ui & fullscreen)

  • The new CoreApp class has been created. This is the new root application class instead of Uno.Application. It contains the lifecycle, Current & Load.

  • All platforms now feed lifecycle events through Platform.CoreApp

  • Uno.Application inherits from this and on desktop adds the GraphicsController and Window. Much of the Application class is deprecated for mobile targets. Window is still present for mobile but is deprecated for imminent removal.

  • GraphicsController is a class which holds much of the code that used to belong to GraphicsContext. It is only used on desktop. The reason for the change is that for mobile, everything in managed in fuselibs. GraphicsContext now exists as a handle.

  • A class called Displays had been added which contains a list of Displays. For now the most used field is MainDisplay, which for all current platforms is the only Display

  • A Display class now exists which holds the Density property & Tick event. There are subclasses of this iOS, Android & Desktop that handle the plumbing.

  • A class called OSFrame has been added which is the new base class of Window. As mentioned above, Window continues to be used on desktop & is deprecated on mobile.

  • Window contained far too many of the events. The EventSources namespace the new home for these migrated events. There are separate static classes for InterApp, HardwareKeys, Text & Mouse events. This separation will allow us to re-evaluate them separately and work on their future place in the API.

  • The mobile root-view bootstrapping is removed from Uno and moved to Fuselibs

  • SystemUI and it's bootstrapping is removed from Uno and moved to Fuselibs

  • Key events now have an Origin field, which is the OSFrame they originated from. This is for platforms where these events originate from Windows as opposed to UI elements

  • All core libraries that touched Platform2 events have been updated to use Platform rather than Platform2

  • Events which on some platforms are forbidden (like quit) now live in an class called Unsafe