Closed ohitsdaniel closed 1 year ago
@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: go(to newPath: [AnyScreen], on: ScreenID)
, then goBack(to: ScreenID)
, replaceContent
and ultimately the goliath, replacePath.
goBack was easy, as it was a duplicate of dismissSuccessor
. 🙈
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.
[x] path
[x] lastOccurenceOf(screen) -> ScreenID
[x] goTo(id:)
[x] goTo(screen:)
[x] go(to newPath: [AnyScreen], on: id)
[x] go(to newPath: [AnyScreen], on: id)
[x] goBack(to: id)
[x] goBack(to: screen)
[x] replacePath
[x] dismiss(id)
[x] dismiss(screen)
[x] dismissSuccessorOf(id)
[x] dismissSuccessorOf(screen)
[x] replaceContent(of: id)
[x] replaceContent(of: screen)
[x] setActive(id)
[x] setActive(screen)
[x] didAppear(id)
[x] View layer for native tab bar
[x] 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. 🚀