Skip to content

Releases: isaac-udy/Enro

Release 2.7.0

30 May 11:26
Compare
Choose a tag to compare
  • ⚠️ Updated to androidx.lifecycle 2.8.1 ⚠️
    • There are breaking changes introduced in androidx.lifecycle 2.8.0; if you use Enro 2.7.0, you must upgrade your project to androidx.lifecycle 2.8+, otherwise you are likely to encounter runtime errors

Release 2.6.0

30 May 10:39
Compare
Choose a tag to compare

2.6.0 * Added isManuallyStarted to the registerForFlowResult API, which allows for the flow to be started manually with a call to update rather than performing this automatically when the flow is created. * Added async to NavigationFlowScope, which allows the execution of suspending lambdas as part of the steps in a flow.

Release 2.5.0

21 May 22:06
Compare
Choose a tag to compare
  • Added update to the public API for NavigationFlow, as this is required for some use cases where the flow needs to be updated after changes in external state which may affect the logic of the flow. This function was previously named next, and removed from the public API in 2.4.0.
  • Moved NavigationContext.getViewModel and requireViewModel extensions to the dev.enro.viewmodel package.
  • Added NavigationResultScope<Result, Key> as a receiver for all registerForNavigationResult calls, to allow for more advanced handling of results and inspection of the instruction and navigation key that was used to open the result request.

Release 2.4.1

07 May 09:21
Compare
Choose a tag to compare
  • Added EnroBackConfiguration, which can be set when creating a NavigationController. This controls how Enro handles back presses.
    • EnroBackConfiguration.Default will use the behavior that has been standard in Enro until this point
    • EnroBackConfiguration.Manual disables all back handling via Enro, and allows developers to set their own back pressed handling for individual destinations
    • EnroBackConfiguration.Predictive is experimental, but adds support for predictive back gestures and animations. This is not yet fully implemented, and is not recommended for production use. Once this is stabilised, EnroBackNavigation.Default will be renamed to EnroBackNavigation.Legacy, and EnroBackNavigation.Predictive will become the default.
  • Removed ContainerRegistrationStrategy from the "core" rememberNavigationContainer methods, to stop the requirement to opt-in for AdvancedEnroApi when using the standard rememberNavigationContainer APIs. This was introduced accidentally with 2.4.0.
  • Added EmbeddedNavigationDestination as an experimental API, which allows a NavigationKey.SupportsPush to be rendered as an embedded destination within another Composable.

Release 2.4.0

01 May 08:49
Compare
Choose a tag to compare
  • Updated dependency versions
  • Added instruction property directly to NavigationContext, to provide easy access to the instruction
  • Added extensions getViewModel and requireViewModel to NavigationContext to access ViewModels directly from a context reference
  • Added extensions for findContext and findActiveContext to NavigationContext to allow for finding other NavigationContexts from a context reference * Updated NavigationContainer to add getChildContext which allows finding specific Active/ActivePushed/ActivePresented/Specific contexts from a container reference
  • Added instruction property to NavigationContext, and marked NavigationContext as @AdvancedEnroApi
  • Updated NavigationContext and NavigationHandle to bind each other to allow for easier access to the other from either reference, and to ensure the lazy references are still available while the context is being referenced
  • Updated result handling for forwarding results to fix several bugs and improve behaviour (including correctly handling forwarded results through Activities)
  • Added transient configuration to NavigationFlow steps, which allows a step to only be re-executed if it's dependencies have changed
  • Added navigationFlowReference as a parcealble object which can be passed to NavigationKeys, and then later used to retrieve the parent navigation flow
  • Prevent more than one registerForNavigationResult from occurring within the context of a single NavigationHandle
  • Remove next from the public API of NavigationFlow, in favour of doing this automatically on creation of the flow
  • Added a new version of OverrideNavigationAnimations, which provides a way to override animations and receive an AnimatedVisibilityScope which is useful for shared element transitions.

Release 2.3.0

11 Feb 06:55
Compare
Choose a tag to compare

See CHANGELOG.md

Release 2.2.0

19 Oct 10:28
Compare
Choose a tag to compare
  • Removed NavigationAnimationOverrideBuilder methods that did not take a returnEntering or returnExiting parameter, in favour of defaulting these parameters to entering and exiting respectively. If you do not want to override return animations, you are able to pass null for these parameters to override the defaults.
  • Removed default EmptyBehavior parameter for rememberNavigationContainer; an explicit EmptyBehaviour is now required. The default was previously EmptyBehavior.AllowEmpty, and usages of rememberNavigationContainer that were relying on this default parameter should be updated to pass this explicitly.
  • Fixed a bug with EnroTestRule incorrectly capturing back presses for DialogFragments that are not bound into Enro

Release 2.1.1

16 Oct 10:06
Compare
Choose a tag to compare

Fixed a bug with EnroTestRule/runEnroTest that would cause instrumented androidTest tests to fail when including both tests that use EnroTestRule/runEnroTest and tests that do not in the same test suite

Release 2.1.0

10 Oct 05:58
Compare
Choose a tag to compare
  • Update to Compose 1.5.x
  • Moved Activity/Fragment integrations out of the core of Enro and into independent plugins (which are still installed by default)
  • Fixed a bug with NavigationResult channels not using the correct result channel id in some cases

Release 2.0.0

19 Sep 08:46
Compare
Choose a tag to compare

Enro 2.0.0 introduces some important changes from the 1.x.x branch:

  • Compose destinations are now stable
  • The BottomSheetDestination and DialogDestination interfaces have been deprecated
  • Synthetic destinations can be defined as properties
  • Forward/Replace instructions have been deprecated
  • Both Composables and Fragments now use a shared NavigationContainer type to host navigation
    • See MainActivity.kt or RootFragment.kt for an example of Fragment containers
    • See ListDetailComposable.kt for an example of Composable containers
    • The OnContainer Navigation Instruction has been added, which allows direct backstack manipulation of NavigationContainers
    • NavigationContainers allow advanced functionality such as interceptors and animation overrides
  • deliverResultFromPush/deliverResultFromPresent are new extension functions which allow a screen to delegate it's result to another screen
  • activityResultDestination is a new function which allows ActivityResultContracts to be used directly as destinations