-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Move all the compose meta data to be above the compose input #9095
Conversation
cc @Luke9389 I created the |
OK cool! Thanks for the heads up |
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.
Just a small comment on styling
{shouldShowReportRecipientLocalTime | ||
&& ( | ||
<View style={[styles.mr3]}> | ||
<ParticipantLocalTime participant={reportRecipient} /> | ||
</View> | ||
)} | ||
|
||
<View style={[styles.mr3]}> | ||
<YouAppearToBeOffline /> | ||
</View> | ||
|
||
<View style={[styles.mr3]}> | ||
<ExceededCommentLength commentLength={this.comment.length} /> | ||
</View> | ||
|
||
<View style={[styles.mr3]}> | ||
<ReportTypingIndicator reportID={this.props.reportID} /> | ||
</View> |
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.
Wrapping each of these components in a <View style={[styles.mr3]}>
is going to produce inconsistent margins when, for example, the first and last components are visible, but the 2nd and 3rd return null
. I think it'd be better to apply a gap: 12px;
style to the flex container and eliminate these inner wrappers.
Also, NAB, but I think it reads cleaner to have && (
on the same line as the boolean var: {shouldShowReportRecipientLocalTime && (
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, that's a really good point with the spacing. I like the idea of using gap
!
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 all looks good to me 👍
...withLocalizePropTypes, | ||
}; | ||
|
||
const YouAppearToBeOffline = (props) => { |
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 was consensus in the Design Doc to call this component OfflineIndicator
because that describes what it is, not what it says or does.
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.
Hm, OK. I personally feel like that is not really a great name for it because an "offline indicator" could be done in several different ways (just an icon, just text, a spinner, something else, etc.). I do not feel too strongly about it at this point though, so I will change the name.
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's a good point. I'm also not dug in on OfflineIndicator
either, just going by the threads in the doc. I think @iwiznia was more strongly opinionated about it. Thanks for making the change anyway. Down to rename if we re-discuss and end up switching back.
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.
YouAppearToBeOffline also does not tell you if it is an icon, just text, a spinner, something else, no?
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.
Yeah, right after I said that, I realized the name I had wasn't much better.
Updated |
Oh, I forgot to make the |
Actually, I found that |
I'll give @amyevans a chance to check this out one more time, given the RN |
TIHI 🙃 This is my first time diving into RN styling and I am shocked/frustrated how limited its capabilities are 😬. Though obviously not as elegant, another option would be to pass |
Hey @amyevans, it looks like Tim is gonna be OOO until June 6. There's an N07 Issue held on this PR, so would it be OK for us to merge this and then make a separate issue for styling? I'd be happy to follow you over there and be the reviewer if you'd like to implement it (I've got the context and you've got the idea). |
Sure, that sounds perfect to me 😄 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
We have extra whitespace below the last message in chats where we aren't showing current time of the contact cc: @tgolen |
🚀 Deployed to production by @luacmartins in version: 1.1.69-2 🚀
|
Details
Some of the information used to be above the compose, and some of it below. All of them had inconsistent styling and bad practices for layout out the UI components.
I put the "user is typing" block at the end, since that's the one that has the biggest chance of flashing on and off. Putting it at the end makes it the least jarring so the position of the other elements don't change when it flashes on and off.
Fixed Issues
$ #9087
Tests & QA
Screenshots
**NOTE: For these screenshots, I hacked the code to display all pieces of meta data at once. This will not be possible to do in production because for example, you can't see "user is typing" when you're offline. **
Multiple users typing:
2022-05-19_10-12-44.mp4
Web
Mobile Web
Desktop
iOS
Android