-
Notifications
You must be signed in to change notification settings - Fork 349
page: Split empty-page placeholder messages into header and message
#1946
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
page: Split empty-page placeholder messages into header and message
#1946
Conversation
|
The bigger text when we only have one sentence looks good to me. |
|
Thanks for the review! Also maybe worth mentioning: the graphics in the Figma are tracked as #1551. |
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 @chrisbobbe! LGTM, moving over to Greg's review.
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! Nits below; otherwise all looks good.
| }) : assert( | ||
| (message != null) | ||
| ^ (messageWithLinkMarkup != null && onTapLink != null)); |
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 assert seems still relevant, right?
And a similar one for the header.
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.
Ah I see, rather it should apply only to the header.
lib/widgets/page.dart
Outdated
| return null; | ||
| } |
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 case would be a straightforward bug at the caller. So instead of having extra logic here (including in build) to handle it, it'd be better to just use ! and end up throwing in that case.
51c196a to
70cc1b3
Compare
|
Thanks for the review! Revision pushed. |
| style: _headerStyle(context), | ||
| header!); | ||
| } | ||
| return TextWithLink( |
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.
(#1946 (comment) cont'd)
Ah, and then this method's caller can be simplified by having this return non-nullable Widget 🙂
70cc1b3 to
a3f5b81
Compare
|
Indeed, thanks—revision pushed. |
Following a new Figma frame that specifies larger text for the first part: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=11194-18392&m=dev
a3f5b81 to
db64354
Compare
|
Thanks! Looks good; merging. |
Following a new Figma frame that specifies larger text for the first part:
https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=11194-18392&m=dev
cc @alya @terpimost
👉 When there's just one thing to say (like "There are no messages here."), do we want that text to be big or small? I've chosen big, here, but that might not actually be intended in the Figma? Figma screenshot:
(This comes from rebasing/developing part of #1640.)
Note changed "the" to "a" on the "Direct messages" page.