Releases: isaac-udy/Enro
Releases · isaac-udy/Enro
Release 2.4.1
- Added
EnroBackConfiguration
, which can be set when creating aNavigationController
. 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 forAdvancedEnroApi
when using the standardrememberNavigationContainer
APIs. This was introduced accidentally with 2.4.0. - Added
EmbeddedNavigationDestination
as an experimental API, which allows aNavigationKey.SupportsPush
to be rendered as an embedded destination within another Composable.
Release 2.4.0
- Updated dependency versions
- Added
instruction
property directly toNavigationContext
, to provide easy access to the instruction - Added extensions
getViewModel
andrequireViewModel
toNavigationContext
to accessViewModels
directly from a context reference - Added extensions for
findContext
andfindActiveContext
toNavigationContext
to allow for finding other NavigationContexts from a context reference * UpdatedNavigationContainer
to addgetChildContext
which allows finding specific Active/ActivePushed/ActivePresented/Specific contexts from a container reference - Added
instruction
property toNavigationContext
, and markedNavigationContext
as@AdvancedEnroApi
- Updated
NavigationContext
andNavigationHandle
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 anAnimatedVisibilityScope
which is useful for shared element transitions.
Release 2.3.0
See CHANGELOG.md
Release 2.2.0
- Removed NavigationAnimationOverrideBuilder methods that did not take a
returnEntering
orreturnExiting
parameter, in favour of defaulting these parameters toentering
andexiting
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 forrememberNavigationContainer
; an explicit EmptyBehaviour is now required. The default was previouslyEmptyBehavior.AllowEmpty
, and usages ofrememberNavigationContainer
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
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
- 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
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
- Replace these with using the Composables named BottomSheetDestination and DialogDestination
- See DialogDestination.kt
- See BottomSheetComposable.kt
- Synthetic destinations can be defined as properties
- See SimpleMessage.kt
- Forward/Replace instructions have been deprecated
- Usages of Forward should be replaced with a mix of Push and/or Present
- See https://enro.dev/docs/frequently-asked-questions.html for an explanation of Push vs. Present
- Usages of Replace should be replaced with a
push/present
followed by aclose
- 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- See the embedded flow for examples
activityResultDestination
is a new function which allows ActivityResultContracts to be used directly as destinations
Release 2.0.0-beta07
Fix issue with BottomSheets introduced by beta06, improved functionality for manually destroying ComposableNavigationContainers
Release 2.0.0-beta06
Fix bug with BottomSheets and Compose 1.5 not behaving nicely together, added a public method for manually destroying a Compose Navigation Container
Release 2.0.0-beta05
Resolve bug with BottomSheets that would cause a crash if a BottomSheet presented another BottomSheet and then immediately closed itself