Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a key to CircuitContent to keep UI and Presenter consistent #1254

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

stagg
Copy link
Collaborator

@stagg stagg commented Mar 1, 2024

In order to resolve #1169 this keys the ui and presenter together so they behave the same.

Here's the *CircuitContent cases this covers:

1. NavigableCircuitContent

  • The ui and presenter are retain based on the record, as the Screen can't change without a new record instance.

2. CircuitContent

  • a) Each Screen instance is a new "page" and would behave the same as NavigableCircuitContent, by being keyed on the Screen instance.
  • b) The Screen is a model, and it's used to update the current CircuitContent state, as if it were another Compose element. This is potentially common with a "widget" sub-circuit case.

@stagg stagg changed the title Key all of CircuitContent to keep UI and Presenter consistent Add a key to CircuitContent to keep UI and Presenter consistent Mar 2, 2024
@stagg stagg marked this pull request as ready for review March 2, 2024 01:06
@stagg stagg requested review from kierse and ZacSweers March 2, 2024 01:06
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:chefskiss:

@stagg stagg added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit be1b3fa Mar 4, 2024
5 checks passed
@stagg stagg deleted the js-circuitcontent-screen-retain branch March 4, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rememberRetained works inconsistently in Ui and Presenter
2 participants