New in version 1.2.0

Released 3 months ago

Please remember to uno clean your projects after upgrading Fuse.

Highlights

  • A lot of engine performance improvements, resulting in faster, slicker apps!
  • Significant stability & performance improvements in the tooling as well.
  • Each has been extended with things like Reuse, Identity and IdentityKey - enabling new use cases and better performance (because unnecessary object allocations is still bad, even though we live in the future.)
  • UX expressions became even more powerful with support for arbitrary array lookups and variable arguments.

Fuse Studio Updates

  • Studio should be significantly faster and more responsive (and we'll keep improving it in future releases as well!)
  • Removing elements using the main menu no longer causes Fuse to crash
  • Gradient stops can now be added from the inspector
  • Fixed a (minor) memory leak
  • Added PageControl and Page to the primitives bar

General tooling & framework updates

Default packages included in the Windows installer
  • All the packages needed for a bare bones Fuse app are now included in the installer. This avoids the need to wait several minutes for the package manager when you first build a project after installing a new Fuse version
Using the tool while offline
  • Fixed a bug that meant that Fuse was not usable while not connected to the Internet.
Preview key events
  • Fixed a bug where AltGr keyboard presses inside a preview viewport would be sent to the main window which meant that it wasn't possible to type e.g. the '@' character on Nordic keyboards.
Code completion
  • Fixed UX completion for tags directly inside the App tag. Previously, you would only get completion when inside a second level tag.
Fuse.Text
  • Fixed an issue where the combination of -DUSE_HARFBUZZ, -DCOCOAPODS and certain Pods (in particular Firebase.Database has been identified) caused an app to link to symbols that the AppStore disallows.
Each
  • Fixed an issue where removing an element would not actually remove the element
Image
  • Fixed issue where an <Image /> could fail to display inside a <NativeViewHost /> on iOS
Router
  • Added findRouter function making it easier to use a router in a page deep inside the UI
  • Fixed and issue where relative paths and nested Router gave an error about unknown paths
UX Expression improvements
  • Added parameter(page) function which returns the routing parameter of the page parsed as an JSON string.
  • UX expressions now support arbitrary array lookups, e.g. {someArray[index+3]}. The same syntax can also be used with string keys, e.g {someObject[someKey]}. The lookup is fully reactive - both the collection and the key/index can change.
UX Expressions (Uno-level)
  • Introduced support for variable arguments to UX functions - inherit from the Fuse.Reactive.VarArgFunction class.
  • The classes Vector2, Vector3 and Vector4 in Fuse.Reactive are now removed and replaced with the general purpose, variable-argument version Vector instead. This ensures vectors of any length are treated the same way. This is backwards incompatible in the unlikely case of having used these classes explicitly from Uno code.
  • Added support for name-value pair syntax: name: value. Can be used for JSON-like object notation and named arguments in custom functions.
Templates
  • Added Identity and IdentityKey to Each. This allows created visuals to be reused when replaced with replaceAt or replaceAll in an Observable.
  • Triggers may now use templates which will be instantiated and added to the parent when active (like a node child).
  • Added templates to NodeGroup, which can now be used in Each.TemplateSource and Instance.TemplateSource
  • Each, using TemplateSource, will no longer respond to template changes after rooting. This was done to simplify the code, and to support alternate sources, and is a minor perf improvement. It's not likely to affect any code since it didn't work correctly, and there's no way in UX to modify templates after rooting.
  • A memory leak was fixed by changing Instantiator.TemplateSource to a WeakReference. Only if you assigned this property a temporary value in Uno would this change impact your code.
  • Clarified/fixed some issues with how Each/Instances handled default templates. Previously if no matching template was found all the specified templates, or a subset, might have erronously been used. Now, as was always intended, if you use MatchKey and wish to have a default template you must specifiy ux:DefaultTemplate="true" on the default template. You cannot have multiple fallback templates, just as you can have only one template of a particular name.
  • If a ux:DefaultTemplate="true" is specified it will be the template that is used; the complete list of templates will not be used.
Fuse.Share
  • Fixed issue where using Fuse.Share would crash on iPad. Users must provide a position for spawn origin for the share popover. Check the Fuse.Share docs for more details.
  • Made iOS implementation internal, this was never meant to be public in the first place
Optimizations
  • Optimized hit testing calculations. Improves scrolling in large scroll views with deep trees inside, among other things.
  • Optimized redundant OpenGL rendertarget operations. Gives speedups on some platforms.
  • Optimized invalidation strategy for transforms, to avoid subtree traversion. This improves performance generally when animating large subtrees (e.g. scrollviews).
  • Backwards incompatible optimization change: The protected virtual void Visual.OnInvalidateWorldTransform() method was removed. The contract of this method was very expensive to implement as it had to be called on all nodes, just in case it was overridden somewhere. If you have custom Uno code relying on this method (unlikely), then please rewrite to explicitly subscribe to the Visual.WorldTransformInvalidated event instead, like so: Override OnRooted and do WorldTransformInvalidated += OnInvalidateWorldTransform;, Override OnUnrooted and to WorldTransformInvalidated -= OnInvalidateWorldTransform;, then rewrite protected override void OnInvalidateWorldTransform() to void OnInvalidateWorldTransform(object sender, EventArgs args)
  • To improve rendering speed, Fuse no longer checks for OpenGL errors in release builds in some performance-critical code paths
  • Improved perceived ScrollView performance by preventing caching while pointers are pressed on them, avoiding inconsistent framerates.
  • Fixed a bug which prevented elements like Image to use fast-track rendering in trivial cases with opacity (avoids render to texture).
  • Optimized how bounding boxes are calculated (improves layout and rendering performance).
Multitouch
  • Fixed issue where during multitouch all input would stop if one finger was lifted.
  • Added the option to opt-out of automatic handling of touch events when implementing a native view.
Attract
  • Added the attract feature, which was previously only in premiumlibs. This provides a much simpler syntax for animation than the Attractor behavior.
Gesture
  • The experimental IGesture interface has changed.
    • The Significance, Priority and PriotityAdjustment have been merged into the single GetPriority function.
    • OnCapture is changed to OnCaptureChanged and provides the previous capture state
  • Clicked, DoubleClicked, Tapped, DoubleTapped, and LongPressed have been corrected to only detect the primary "first" pointer press. If you'd like to accept any pointer index add PointerIndex="Any" to the gesture.
  • SwipeGesture, ScrollView, LinearRangeBehaviour (Slider), CircularRangeBehaviour, Clicked, Tapped, DoubleClicked, DoubleTapped, LongPressed, WhilePressed all use the gesture system now. They have a GesturePriority property which can be used to adjust relative priorities -- though mostly the defaults should be fine.
  • The SwipeGesture.GesturePriority default is changed from High to Low. This better fits with how the priorities should work together in a typical app and in general shouldn't affect any usual layouts. You can alter the priority with GesturePriority="High"
Each Reuse
  • Added Reuse to Each allowing the reuse of nodes
  • Added OnChildMoved to Visual. Anything implementing OnChildAdded or OnChildRemoved will likely need to implement OnChildMoved as well. This happens when a child's position in Children list changes.
  • Added OnChildMovedWhileRooted to IParentObserver
WhileVisibleInScrollView
  • Added How property to WhileVisibleInScrollView trigger that accepts values Partial (default) and Full. When set to Full, the trigger is only active when the whole element bounds are inside view.
Broken Uno tools removed
  • uno perf-test and uno perf-cmp were unused and broken, and have been removed.
Deprecations
  • The unused class Uno.FakeTime has been marked as obsolete.
  • The ExportCondition attribute in Uno.Compiler.ExportTargetInterop has been marked as obsolete.
  • The legacy Alert and Confirm methods in Uno.Diagnostics.Debug has been marked as obsolete.
  • The redundant SupportsMipmap fields in Uno.Graphics has been marked as obsolete.
  • The constant float.ZeroTolerance has been marked as obsolete.