adrielcafe / voyager

🛸 A pragmatic navigation library for Jetpack Compose
https://voyager.adriel.cafe
MIT License
2.39k stars 114 forks source link

Voyager 1.1.0-beta01 issues #429

Open Tolriq opened 1 month ago

Tolriq commented 1 month ago

Still trying to debug this but after updating from 1.1 A4 to 1.1 B1 I have tons of strange issues with states not restored with tabs and backhandling not behaving correctly after going home then back to the app.

If you have some clue about how to debug that please tell.

DevSrSouza commented 1 month ago

We did have any major changes that could effect this, can you have a look at the diffing between both versions?

https://github.com/adrielcafe/voyager/compare/1.1.0-alpha04...1.1.0-beta01

Tolriq commented 1 month ago

Well you migrated the state to KMP. I did not have time to investigate and rolled back, but there's quite a few changes around state save order and the issue was about state save restore.

kaidotarma commented 1 month ago

I am experiencing weird UI state issues after upgrading to 1.1.0-beta01 or 1.1.0-beta02. 1.1.0-alpha04 worked well.

The biggest issue for me seems to be that BottomSheetNavigator children (back layer and front layers) don't get new CompositionLocalProvider values. Currently fixed it by adding a wrapper to hold CompositionLocalProvider locally (had to do it in the children).

Don't know if these issues are related, but they seem to be.

Hope someone finds the root cause. :)

DevSrSouza commented 1 month ago

Can you share your solution to understand what it is fixing?

kaidotarma commented 4 weeks ago

@DevSrSouza to give an example of the issue, I forked the repo and created a branch with two commits: Success: https://github.com/kaidotarma/voyager/pull/1/commits/0c63df8c7e1edeb3e0bc359cde6965fec87fb3ae Fail: https://github.com/kaidotarma/voyager/pull/1/commits/54482975f8ec8292e931ae4d864d734b9fa9b09b

The issue can be seen by these steps:

  1. run the app
  2. open BottomSheet Navigation
  3. see two "Change theme" buttons, click on them
  4. the top one changes only when using 1.1.0-alpha04 and will not change when using 1.1.0-beta01 or 1.1.0-beta02

The code for these buttons are on these lines: https://github.com/kaidotarma/voyager/pull/1/commits/0c63df8c7e1edeb3e0bc359cde6965fec87fb3ae#diff-f299d84b94d315b2ee35f9a74ebb4468bf4c09c9fddf3146981a86352599a87cR40-R46

The issue might be in this library, or related to the update of Compose KMP to 1.6.10 EDIT: Tried reverting back Compose KMP to 1.6.1 - didn't change anything, still the same issue.