-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 Unread Action Indicator #1570
Conversation
@shawnborton |
Looks great, thanks for the quick work! |
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 LGTM but will leave the real review for @bondydaa
8b9a87d
to
d5f9ef9
Compare
@roryabraham Problem: As we can see in these logs (hopefully we can see after some zoom, haha), when a message is sent and I select the report with this new message, the report retrieved from the Onyx store with |
Just realized that the
|
51ef5a4
to
c983e25
Compare
Co-authored-by: David Bondy <bondydaa@gmail.com>
4b04cbe
to
5a145d4
Compare
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 wasn't able to get through all of this but wanted to get these up here before I signed off for an appointment.
I'll finish up later tonight and add any other comments.
@roryabraham all yours |
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.
Okay, good points, thanks for making those small changes. Other than the unused import LGTM 👍
b74e84b
to
be9ba30
Compare
@marcaaron @roryabraham
Details
Created a "last unread" indicator on the Reports View. It appears on the top of the last unread action and fades out after a set time.
It doesn't show up when the report is active and receives a new message.
About scrollToIndex:
As mentioned on the issue page, I couldn't find a trivial solution to this, since
scrollToIndex
isn't precise at all with items with dynamic height. I still want to try to calculate the height and use it withscrollToOffset()
, but I thought it would be better to create a PR with the rest of the code first.@shawnborton
Animation info:
Just for reference if you want me to try some other values out.
Notes:
position: absolute
, and it was working fine everywhere just usingheight: 0
. But it seems like ios<Text />
doesn't like it very much, since it was not showing up (the line was showing, the text wasn't). It was working everywhere else;Sidebar
is open, and a new message is received on the active report, it is set as read, and the indicator doesn't show up (if the user re-enters the report). I actually wrote some code around it withwithWindowDimensions
, and adding theIS_SIDEBAR_SHOWN
onyx prop, but decided to remove it. I believe the best solution would be to start changing the code deeper down, to make sure an action is not set as read ifisSmallScreen
andIS_SIDEBAR_SHOWN === true
. It would still need some refactoring on theReportActionsView
code, but I believe it is the best approach;renderItem()
component is wrapped inside a<View />
instead of a<React.Fragment />
for compatibility between the native and web/desktop<InvertedFlatList />
. If we don't do it, the indicator actually shows up on the bottom of the message instead of on the top when on native.Fixed Issues
Fixes #1498
Tests
Tested On
Screenshots
Observation: After I got all the images, I realized the
NEW
text was not bold as on the reference, as well as the spacing was maybe too high.Because it takes a while to take new images, and it is very simple, I just changed the Mobile-Web image after making the changes. I hope it is ok.
So, please, the text IS BOLD. Sorry about that.
Web
Mobile Web
Desktop
iOS
Android