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
Add helper text for "server URL" with link to documentation #595
base: main
Are you sure you want to change the base?
Add helper text for "server URL" with link to documentation #595
Changes from all commits
ed81d05
5a0a178
560a4e0
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.
nit: even in examples, let's stick to HTTPS everywhere:
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
// TODO(log)
got dropped. Was that intended?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 doc doesn't really add anything beyond the function's name and parameters; so better to leave it out.
See:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#avoid-useless-documentation
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.
From the name, I can't really tell what this does; I don't know what "without realm" means.
I think what this function is really about in contrast with
launchUrlWithRealm
is that it requires the URL to be already resolved to an absolute URL — it won't accept a relative link. So we can rename it accordingly.We can also revise the doc to be more specific about what "launch" means, following the upstream
launchUrl
doc; and add an assert checking that expectation of an absolute URL: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.
Similarly I don't feel like "with realm" quite makes clear what the relationship to the realm is. I think
launchUrlWithRealmBase
would do it.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.
There's lots more to test on this page 🙂 — so this TODO is still relevant and let's keep it.
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
GlobalLocalizations.zulipLocalizations
is application state that can change. So reading it should happen within individual test cases (including helpers they call), i.e. individualtestWidgets
callbacks, not outside 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.
When a test manipulates
testBinding
, it needs to calladdTearDown(testBinding.reset)
somewhere so that the state gets reset before the next test.(In the "error dialog if invalid link" in widgets/content_test.dart which this one is presumably based on, that gets taken care of by the
prepare
helper, because the latter does other things withtestBinding
that also need a reset.)You can reproduce the problem with the command:
At your current revision, that often fails because
launchUrlResult
remains set to false when the other new test tries to run. After you fix the problem with a reset, that command should pass every time.