Split avatar, presence, status widgets out from content.dart #1735
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.
These started here with Avatar, one little widget which we didn't have a more natural home for and so tucked in with the content widgets.
That gradually grew from 34 lines to 159 lines, across several widgets. Then when we built widgets for presence and user status, we put them here as they're natural companions of the avatar. Now it's 367 lines in total, none of it really about message content; so give this all its own separate file.
(I had this thought a few weeks ago, but didn't want to create merge conflicts with the PRs adding presence and user status. Now that #1702 is merged, it's a good time for this move.)
Along the way, the need to move a few bits from
content_checks.dart
reminded me of an old recurring annoyance and prompted me to think of a new solution:608a24f test [nfc]: Consolidate a widgets/checks.dart for trivial checks-extensions
I've long had a recurring small annoyance that the "foo_checks.dart"
file interferes with tab-completion for "foo_test.dart". For example
as mentioned in this comment:
#1608 (comment)
So here's an approach to solve that, beginning with the "checks" files
in test/widgets/.
For updating the imports, I used a bit of Perl: