square / square/workflow-kotlin

Compose's insets are lost through a backstack container

Open
#855 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.