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
autocomplete: Add user avatars to user-mention autocompletes #590
autocomplete: Add user avatars to user-mention autocompletes #590
Changes from all commits
ec07043
4ab1a82
919cf12
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.
With this call, it becomes part of the interface of this
setupToComposeInput
function that its caller needs to setdebugNetworkImageHttpClientProvider
back to null before the end of the test. So this function should gain a note to that effect in its dartdoc, just likeprepareBoringImageHttpClient
has.(It's regrettable that that reset can't be done using
addTearDown
, so that callers and callers' callers wouldn't have to care like this. There's an open issue upstream about that, relating todebugNetworkImageHttpClientProvider
and a bunch of other Flutter test knobs of a similar flavor. I don't have the link offhand, but it'd be good to track it down again and then put a comment onprepareBoringImageHttpClient
pointing to that.)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 found a closed issue upstream. This one also seemed closer to this, but wasn't sure to add it to the
prepareBoringImageHttpClient
comment.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.
Thanks for looking! Found the one I was thinking of (which it turns out is one I filed 🙂), and added a comment: 68116a2
Looks like there was a backlink to it in the second issue you found:
as that issue is basically a different specific case of the issue I had in mind.
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 version is fine. But for other situations where the shared context is more verbose than just
store,
and so it's more of a pain to have to pass it each time, there are two solutions we often use:store
as a local.store
can be alate
variable that's declared up at the top of a test group, or of the whole testmain
, and that gets initialized afresh by a helper function that each test case calls. Those helpers are often namedprepare
or of the formprepareFoo
.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.
nit: prefix for this commit:
f3aebc9 autocomplete [nfc]: Pull
prepareBoringImageHttpClient
out to toplevelshould be
autocomplete test [nfc]:
, to indicate that it's only touching the test code(And then the "nfc" part means that on top of that, it has only an NFC effect on even the test code.)
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.
Oh and looking again, it's not really about the autocomplete tests in particular, so
autocomplete
isn't quite right.I'll make it
content test [nfc]
, since it is in that file. Could also have made it justtest [nfc]
, since the point is it's now exporting this for other tests.