square / square/workflow-kotlin
Compose's insets are lost through a backstack container
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 112
- Avg merge
- 10h 5m
- Merged PRs (30d)
- 3
Description
When using a certain configuration of nested workflows (I haven't found exactly the logic there), involving a backstack container (it might be a red herring I guess), Compose's insets are not propagated.
There's a repro here.
In MainActivity.kt/HelloComposeModel, the first workflow that's started is NavigationWorkflow, which in turns starts BackStackWorkflow either with or without a backstack - the insets are missing if there's a backstack. However, if HelloComposeModel starts NavigationWorkflow directly, regardless of with or without a backstack, everything works just fine.
This started appearing after an upgrade to Compose 1.2.0, insets were previously part of Accompanist and went through quite a bit of a change (https://google.github.io/accompanist/insets/#migration-table).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked insets-repro, especially MainActivity.kt and HelloComposeModel, and trace the NavigationWorkflow and BackStackWorkflow paths. Compare the behavior when NavigationWorkflow starts BackStackWorkflow with and without a backstack, then compare it with starting NavigationWorkflow directly. Done means Compose insets are propagated in the nested backstack configuration as well.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100