-
Notifications
You must be signed in to change notification settings - Fork 25
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
Tabbed screen #71
Tabbed screen #71
Conversation
@ohitsdaniel any updates, maybe you need help with something? |
@krzysztofzablocki I had some time off and tried not to look at code last week. Getting back to this today (just opened up my laptop). Feel free to pick up any of the path mutations and PR into this branch from your fork. Just leave a comment in this PR so that I know what you're working on. I will implement lastOccurenceOf now, as it opens up the door for screen-based navigation. :) |
I'm wrapping my sprint work today and will chat with my team so that I can spend some time and try helping out tomorrow |
Cool, thanks in advance! |
Implemented lastOccurrence(of:) and the screen-based navigation (which for now still calls through to the old linear path mutations. But once we implemented those, they will be ready to go as well. As I'm still off work and want some time to do code-unrelated activities, I will pick up some more path mutations tomorrow. :) FYI: Replace path will be the hardest one as we need to define how to replace a tree given a linear path. Would recommend goTo(path:, on:) or goBack(to:) as 'beginner friendly mutations'. |
Picking up dismiss and dismissSuccessor. |
Both dismisses done, next up tomorrow: |
goBack was easy, as it was a duplicate of |
Finally broke the knot in my head trying to figure how to implement replace / goToPath. All exiting tests pass now, will add tests for tab screens tomorrow evening. |
👀 |
Helps with #19.
Problem
To enable Tab bar supports, we need to refactor all Navigation path mutations.
path
lastOccurenceOf(screen) -> ScreenID
goTo(id:)
goTo(screen:)
go(to newPath: [AnyScreen], on: id)
go(to newPath: [AnyScreen], on: id)
goBack(to: id)
goBack(to: screen)
replacePath
dismiss(id)
dismiss(screen)
dismissSuccessorOf(id)
dismissSuccessorOf(screen)
replaceContent(of: id)
replaceContent(of: screen)
setActive(id)
setActive(screen)
didAppear(id)
View layer for native tab bar
initialiseDefaultContents(for screenID:, contents)
check onDismiss and see if adjustments are needed
add tab bar to example app, write UI tests
pushing content onto the tab view
Solution
Do it. And write tests for it, to make sure nothing breaks. 🚀