This is to demonstrate having something like a 'Coordinator' that
handles the routing logic of the feature.
It is done as a seperate commit to compare against the original
implementation that has the routing logic encoded explicitely in
each view.
This adds screens to represent a basic "Send" Feature. The main
purpose of this is two-fold.
1. To act as a placeholder for the actual journet
2. To demonstrate a slightly different navigation paradigm, i.e,
a `NavigationView` with >1 depth.
- Rename `Binding.map` to `Binding.compactMap`
- Add `Binding.map` with an updated signature
These should now match the naming conventions of similar
methods on types.
This is a way to add back some of the "free" animations that we lose when
creating custom bindings instead of using `@State` variables, which is
extremely common in TCA / unidirectional architecture.
For an example check out the live preview in the `WithStateBinding` file.
The first is with a standard State binding, click to get the detail and then
drag from the leading edge slowly. You will notice the selection highlight _gradually_
gets less the more you drag (or stronger if you go back).
For the second one with a custom binding, drag back and you will notice it is either
entirely selected, or deselected.
The third uses `WithStateBinding` to give _back_ the nice animations to custom bindings.
This demonstrates going from a view with no active navigation, to one that is state driven.
It is intended to be representative of the work needed to achieve this.
- Add the `State/Action/Reducer` combination to represent a basic TCA feature
- There is a `route` property on the state which represents our navigation state
(we will use this to drive more navigation state in the next commit)
- The state has a property which is a `TransactionHistoryState`
we create our new reducer by leaning mostly on the existing one.
- Temporarily we set up a text representation of our state
- Temporarily Use `HomeView` as the app's entry point, to be replaced with an `AppView`
This gives us a more readable approach to set up navigation links
that mirrors other `SwiftUI` navigation paradigms such as `.sheet`.
We use the modifier to simplify navigation link setup for `TransactionHistoryView`
We also include some `Binding` extensions to help creating them.
This adds a "TCA" feature of a (very) basic transaction history and detail.
It demonstrates a purely state driven navigation stack.
Specifically, a `route: Route?` value is tracked in the state.
This value is driven by the selection of a transaction in the list,
setting it to to `.selectedTransaction(transaction)`,
which then pushes the detail view for that `transaction` onto the `NavigationView`.
Popping the detail view sets the property to `nil`.
Take a look at the previews in `TransactionHistoryView` try them "live" as well.
**N.B** The models are _not_ correct in any way, though are meant to be somewhat representative
and give something to display.
Recovery Phrase word chip, fonts and colors
Adjust font and layout
move background code to EnumeratedChip
enhance preview
Fix chip size not being uniform and trimming
code cleanup
remove Font License
code cleanup