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.
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
[pigeon] Adds Quick start guide to README #8098
base: main
Are you sure you want to change the base?
[pigeon] Adds Quick start guide to README #8098
Changes from 1 commit
7026261
3fee1bb
c52f2f1
217c883
36d5a24
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is an internal implementation detail, not something people generally need to know.
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.
FWIW, Our existing documentation does mention efficiency gains which personally made me wonder, "O RLY? Like what?"
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.
These changes don't describe the efficiency gains, so I'm not sure how that related to adding this paragraph.
If we want to add a technical discussion somewhere of how Pigeon improves over the common pattern of using string-keyed dictionaries to send multiple parameters we could, but that would be completely orthogonal to making it easier to understand how to use Pigeon (and IMO wouldn't be a great use of README space).
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.
This seems like a long-form tutorial rather than a quick-start.
Maybe a codelab would be a better place for some of this content?
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.
It's not clear to me how this step is different from the previous step.
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.
Define your messages
intends to describe defining the data structures that will be passed back and forth; whereasDefine which methods to expose
is about theHostApi()
andFlutterApi()
decorators which expose a class with methods.A function and its parameters are definitely heavily linked, but given the context of Pigeon jargon, they felt distinct to me.
WDYT?
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.
Many uses of Pigeon don't even require data structures; I don't see these are separate steps (and if they were, certainly wouldn't put defining data structures before figuring out what the methods are going to be that would need them).
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.
This language seems very confusing to me; functions don't live on threads, calls are on threads. There is no inherent binding between a function and a thread.
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 don't think we have any code in our repo that looks like this, so I would not say this is typical use. I'm not sure why we need an example for this at all.
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.
This code (and on down) is what inspired it.
FWIW, this whole PR was inspired by me reading Pigeon's documentation, still being quite confused about the high level picture, and then having to piece it together from sample source code. My goal is to elevate the high level picture with snippets to the top-level README.
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.
Pigeon is great, but I thinks fundamental API shape has a decent learning curve (writing a pseudo-class, generating an abstract class off that, defining a concrete class and registering it with the generated abstract class). It's all fairly unusual, so my general sense here is that we're currently short on context and perspective explainers around code samples.
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.
That code is pretty artificial, due to the constraints of trying to fit an example of Pigeon usage into a single-file application.
Sure, but none of that is related to
StatefulWidget
. I would rather the readme focus on important concepts that are fundamental to using Pigeon, rather than spending space on the unrealistic example of embedding usage directly into aStatefulWidget
.