Releases: ryanmoelter/magellanx
0.6.0
BREAKING change
- Automatically attach
onBackPressedDispatcherinsetContentNavigable(). Now, the only code required to attach Magellan to yourMainActivityissetContentNavigable().
Other changes
- Make compose previews work without using interactive mode for
Journeys and nestedSteps by @ryanmoelter in #215 - Bump target and compile SDK level from 34 to 35
- Update dependencies, including to Kotlin
2.1.0and Compose BOM to2024.12.01
Full Changelog: 0.5.2...0.6.0
0.5.2
What's Changed
- Update dependencies, including to Kotlin
1.9.23, Compose BOM to2024.03.00, Compose Compiler to1.5.11.
Full Changelog: 0.5.1...0.5.2
0.5.1
What's Changed
- Fix unintentional transition when starting a Journey by @ryanmoelter in #133
- Update some dependencies, including compose BOM to
2024.02.02.
Full Changelog: 0.5.0...0.5.1
0.5.0
What's Changed
- Create sample app by @ryanmoelter in #44
- Pause navigables when they're transitioning out by @ryanmoelter in #123
- Add Started lifecycle state by @ryanmoelter in #124
- Update a bunch of dependencies, including compose bom
2024.02.01and compose compiler to1.5.10
Full Changelog: 0.4.1...0.5.0
Breaking change: Introducing the Started lifecycle state
Started replaces Shown and represents "being drawn to the screen with an active Activity and View" (though we don't really need to care about views in compose). This aligns with Android's use of the term "started". It's also worth noting that our ComposeStep.Content() is only active when Started or Resumed.
Shown is still around, though it now represents "on top of the backstack". show() and hide() are now effectively navigatedTo() and navigatedFrom() respectively.
This means that we now have a lifecycle state (and coroutine scope) in which to put work that we want to survive a rotation, but not navigating to another Step. In most cases, shownScope is where you want to put work happening in a screen, unless you want it to only run while focused (resumedScope) or while the view/activity is active (startedScope).
| State | On backstack | Top of backstack | View created + Activity available + Compose active |
In focus |
|---|---|---|---|---|
| Destroyed | ✘ | ✘ | ✘ | ✘ |
| Created | ✔ (roughly) | ✘ | ✘ | ✘ |
| Shown (changed) | ✔ | ✔ | ✘ | ✘ |
| Started (new) | ✔ | ✔ | ✔ | ✘ |
| Resumed | ✔ | ✔ | ✔ | ✔ |
Migration steps
- Any work that requires an activity, view, or active composition should move to
startedScope. - Any other work, especially anything you want to survive rotation, can stay in
shownScope.
0.4.1
- Expose
ComposeNavigator.currentNavigableandcurrentNavigableFlowfor use inJourneys
0.4.0
- Update Kotlin to
1.9.22and compose compiler to1.5.8 - Update Compose BOM to
2024.01.00(Compose version1.6.0) - Update other internal dependencies
0.3.1
- Fix Jitpack build
0.3.0
- Update Kotlin to
1.9.21and the compose compiler to1.5.7 - Update compose BOM to
2023.10.01 - Update and/or remove other internal dependencies
0.2.0
- Update compose to stable, BOM version
2022.11.00 - Update Kotlin to
1.7.10and the compose compiler to1.3.1 - Update lots of other internal dependencies
0.1.2
- Remove
Contextfrom lifecycle events