-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add bundle parameter to route #207
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,15 @@ public struct VisitProposal { | |
public let url: URL | ||
public let options: VisitOptions | ||
public let properties: PathProperties | ||
public let bundle: [String: Any]? | ||
|
||
public init(url: URL, options: VisitOptions, properties: PathProperties = [:]) { | ||
public init(url: URL, | ||
options: VisitOptions, | ||
properties: PathProperties = [:], | ||
bundle: [String: Any]? = nil) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, this will be great to have. If There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What actually is the bundle here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It doesn't feel particularly odd. We could certainly rename it to
So, for example, in HEY we have an import contacts flow that's something like this:
There's no easy path to move between screen 1 and 2 using Jay and I discussed this and Android has an easy way of doing this which is passing along the data required for setting up the screen alongside the route. In the scenario above, we'd call something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohhh! Very interesting. Thanks for the explanation. My vote is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah! Sure, totally missed that. I'll rename to context. 👍🏻 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point too! I'll try to find a good name and report back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this idea! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
self.url = url | ||
self.options = options | ||
self.properties = properties | ||
self.bundle = bundle | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should go with
Any?
instead of[String: Any]?
. This would allow to directly pass an object, instead of providing a key value pair.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think keeping this makes more sense as it maintains parity with Android.