bluelinelabs / bluelinelabs/Conductor

[Discussion] ControllerChangeHandler shouldn't handle view attaching or detaching

Open
#265 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.9k
Forks
338
PR merge metrics
No merged PRs in 30d

Description

`ControllerChangeHandler` keeps the from view if `removeFromViewOnPush` is false. That may keep some views which can't be seen still attached.

For example, I push several `SwipeToFinishController` to the route. The controller under `SwipeToFinishController` can be seen if the `SwipeToFinishController` is being swiping. So the `removeFromViewOnPush` must be set to false. That keeps all `SwipeToFinishController`s attached. Actually only top two `SwipeToFinishController`s can be seen.

Here is my solution:

1. Add a new property to `Controller`. This property describes how the `Controller` affects the visibility of `Controller`s below.
2. Let `Route` decide which views should be attached or detached according to this property of them.

I have created a library about this issue.
https://github.com/seven332/conductor-attacher

Contributor guide

Open the contributing guide

Research direction

Start by reading ControllerChangeHandler and the Controller and Route entry points mentioned in the proposal, then compare the behavior with the linked conductor-attacher library. Done means the route determines which views remain attached based on each controller's visibility effect, while preserving the described SwipeToFinishController behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.