-
Notifications
You must be signed in to change notification settings - Fork 50
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
Full screen portal #81
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lukaville
reviewed
Sep 5, 2019
android/app-example/src/main/java/com/badoo/ribs/example/rib/big/builder/BigScope.kt
Show resolved
Hide resolved
lukaville
reviewed
Sep 5, 2019
...base/src/main/java/com/badoo/ribs/core/routing/configuration/action/single/ActivateAction.kt
Outdated
Show resolved
Hide resolved
ShikaSD
reviewed
Sep 5, 2019
android/app-example/src/main/java/com/badoo/ribs/example/rib/big/BigView.kt
Outdated
Show resolved
Hide resolved
android/app-example/src/main/java/com/badoo/ribs/example/rib/big/builder/BigScope.kt
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Structure of RIBs in branch
Portal
showsSwitcher
by defaultSwitcher
can switch toHelloWorld
HelloWorld
embedsSmall
Small
can trigger attachingBig
directly toPortal
(by clicking button)Big
embedsSmall
again, so can test multiple portal additionsTo test
Switcher
Big
instances in chain, leave app with don't keep Activities, restore, checkBig
is properly rebuilt (even thatPortal
doesn't directly know about thisNode
), check back stack is properly restored as wellHow it's done
Node
that's attached throughPortal
is actually attached both in the view tree and both as a logical child of thePortal
implementingRouter
, through aConfiguration
(checkPortalRouter
), even though it knows nothing about the child directlyPortal
needs to know how to build that remoteNode
, so that it can restore it lateranchor
, which is the parent that wants to build theNode
- it's the same as actual parent in all default cases, but when showing through aPortal
, anchor is the triggering parent, while actual parent will be thePortal
implementingNode
Node
containsAncestryInfo
which can be used to back track a chain ofConfigurations
throughanchors
that can be used to reach it againConfigurations
areParcelable
, so is aList<Parcelable>
of them, which is whatPortalRouter
stores in itsPortal
configurationNode
to be added as full screen againImplications
Portal
hostNode
doesn't know about actual attachedNode
Nodes
are detached from viewNodes
are stopped, as they go to back stackOverlay
dialogs through Portal as well, with proper full lifecycle implications (solving tricky case outlined in Lifecycle events can be missing #44), but needs further investigationSmallInteractor
&SmallRouter
shows how its configuration ofFullScreen.ShowBig
is both part of itsConfiguration
sealed class (requiring exhaustivewhen
inresolveConfiguration
), but also not part of itsContent
type, meaning it cannot even be pushed toSmallRouter
accidentally (win)Room for improvement
PortalRouter
cover non-urgent cases that can be improved laterNode
about movingAncestryInfo
to constructor is a BC breaking change, will be done in another ticket. Right now it's fine the way it is, it will be needed for the resolution of other TODO comments.