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

Upstream some navigation improvements from Tivi #835

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

ZacSweers
Copy link
Collaborator

@ZacSweers ZacSweers commented Aug 30, 2023

Borrowing from https://github.com/chrisbanes/tivi/blob/main/ui/root/src/commonMain/kotlin/app/tivi/home/NavigableCircuitContentWithPrevious.kt after working with @chrisbanes

This brings in two important changes

  • Pass the whole list of records to DecoratedContent, allowing more complex handling of back gestures (predictive back in android, drag gestures in iOS, etc)
  • Refactor out a buildCircuitContentProviders(), which enables movableContentOf to work since it's reusing the same instance for records across changes.

Along the way this promotes immutable collections to the first part API for compose stability

…irst arg

This allows for more complex backstack nav handling, such as predictive back gestures
@chrisbanes
Copy link
Contributor

Looks good!

@ZacSweers ZacSweers merged commit d2ea745 into main Aug 30, 2023
@ZacSweers ZacSweers deleted the z/navigationImprovements branch August 30, 2023 19:24
github-merge-queue bot pushed a commit that referenced this pull request Aug 31, 2023
This is a port of functionality which I've been using in
[Tivi](https://github.com/chrisbanes/tivi) for a while now. With the
recent changes in #835, this unlocks the path way it upstreaming them as
a new CircuitX library.

- I've updated the CircuitX docs below, so that contains all of the
necessary information.
- Migrated the Star sample to using this
- Migrate Tivi to use this (via `mavenLocal`) in
chrisbanes/tivi#1494 and everything is working
nicely.
ashdavies pushed a commit to ashdavies/circuit that referenced this pull request Sep 14, 2023
Borrowing from
https://github.com/chrisbanes/tivi/blob/main/ui/root/src/commonMain/kotlin/app/tivi/home/NavigableCircuitContentWithPrevious.kt
after working with @chrisbanes

This brings in two important changes
- Pass the whole list of records to `DecoratedContent`, allowing more
complex handling of back gestures (predictive back in android, drag
gestures in iOS, etc)
- Refactor out a `buildCircuitContentProviders()`, which enables
`movableContentOf` to work since it's reusing the same instance for
records across changes.

Along the way this promotes immutable collections to the first part API
for compose stability
ashdavies pushed a commit to ashdavies/circuit that referenced this pull request Sep 14, 2023
This is a port of functionality which I've been using in
[Tivi](https://github.com/chrisbanes/tivi) for a while now. With the
recent changes in slackhq#835, this unlocks the path way it upstreaming them as
a new CircuitX library.

- I've updated the CircuitX docs below, so that contains all of the
necessary information.
- Migrated the Star sample to using this
- Migrate Tivi to use this (via `mavenLocal`) in
chrisbanes/tivi#1494 and everything is working
nicely.
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.

2 participants