You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need the ability to retain simple internal presenter state when a screen leaves the composition but remains on the backstack.
Clarification
When speaking of a presenter, there are 2 types of state:
internal presenter state that drives its emissions
state emitted by the presenter and consumed by the UI
In this case I am only concerned about the first type.
Reasoning
Right now, the internal presenter state is a combination of things:
the Screen object
internal state accumulated through user interactions (ie. events)
data obtained and/or calculated using data from the screen and or events
When returning to the composition (due to Navigator.pop), a presenter can refetch/recalculate the state described in option 3 so it can be safely ignored here. Similarly, we already retain screen instances on the backstack ensuring any data they contain will always be available to its presenter.
The missing piece is the internal state described in option 2: state that builds up in response to a user interacting with a circuit. This state is transitive and is not something you'd typically want or need to persist somewhere more permanent (like a db).
What's missing is a mechanism allowing the presenter to retain this internal state. This missing functionality can lead to usability issues:
Example
A user is interacting with a list of data. They apply some filtering, make a selection, and navigate away. Later the user returns to the list screen by popping the navigator
Expected behaviour
The list should render using the previously applied filters
Current behaviour
The previous state was lost so the list renders without any filters.
Related bugs
This issue appears in the following bug report: #116
The text was updated successfully, but these errors were encountered:
We need the ability to retain simple internal presenter state when a screen leaves the composition but remains on the backstack.
Clarification
When speaking of a presenter, there are 2 types of state:
In this case I am only concerned about the first type.
Reasoning
Right now, the internal presenter state is a combination of things:
When returning to the composition (due to
Navigator.pop
), a presenter can refetch/recalculate the state described in option 3 so it can be safely ignored here. Similarly, we already retain screen instances on the backstack ensuring any data they contain will always be available to its presenter.The missing piece is the internal state described in option 2: state that builds up in response to a user interacting with a circuit. This state is transitive and is not something you'd typically want or need to persist somewhere more permanent (like a db).
What's missing is a mechanism allowing the presenter to retain this internal state. This missing functionality can lead to usability issues:
Example
A user is interacting with a list of data. They apply some filtering, make a selection, and navigate away. Later the user returns to the list screen by popping the navigator
Expected behaviour
The list should render using the previously applied filters
Current behaviour
The previous state was lost so the list renders without any filters.
Related bugs
This issue appears in the following bug report: #116
The text was updated successfully, but these errors were encountered: