-
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
Implement ReportDateIndicator #35897
Conversation
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.
Left comments, after LGTM.
@chiragsalian Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Do you have an example to show with the new message indicator (green button)? |
here you go! Screen.Recording.2024-02-28.at.21.54.06.mov |
The new message indicator is looking good! @shawnborton I agree the date badges need some space. In my mocks I have |
My bad, I will apply the changes soon! |
@shawnborton Pushed changes containing padding fix! |
Wonderful, do you have new screenshots for review? |
Also, going to run a quick test build so we can test as well. |
This comment has been minimized.
This comment has been minimized.
Going to leave some comments now that I am testing! I would think that the Feb 6 date badge would be on top of the Feb 2 badge as we scroll. I also think the Feb 2 badge should stop scrolling with the message a bit sooner - it doesn't need to keep scrolling with the page even if the Feb 2 message is aleady gone. Let me know if that makes sense. |
I've found issue with I've fixed that so it should always instantly popup when typing first message of the day today_indicator_fix.mp4
This is something that I wasn't able to reproduce. I've checked it in multiple conversations and everything was fine. Can you provide some reproduction steps? |
I think that was the idea but after seeing it in action, it makes me wonder if we should try to implement it correctly the first time, otherwise we're going to be in a weird state without the floating labels for a while. Do we have any idea how long a follow up would take, and what the technical feasibility is like? Just want to make sure we have a solid plan and that we aren't just kicking this can down the road. |
Also, I think we really need to sort out our approach for threads and reports. Do you have thoughts there @puneetlath? For example, it doesn't feel super great here: Not to mention that report should actually display as a single transaction view, so maybe you need to pull in main? |
I will investigate this and I will try to get back to you with an answer today but no promises as I will be finishing for the day soon (I will be back 6th of May)
Recording was done after merging main today in the morning and I'm pretty sure changes from this branch didn't add/change anything else but the indicator. I will rebase again |
Sounds good, will trigger a new test build |
This was @MrRefactor idea for the implementation of the floating indicator. I will discuss this with him, maybe search for some kind of alternative as he mentioned costly refactor and get back with an estimate |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
I'm still not seeing a "Today" label in the #social room either. |
So am I right in understanding:
Is that right? If so, maybe we assess the technical complexity of doing the flowing indicator. And based on that we decide whether we want to go forward or just punt this for now. |
That sounds about right, though I am a bit torn on this point:
It can definitely make the threads a little messy, especially if you are nested a few levels deep across a range of dates/times in a thread. What do you think we should do there? |
I agree with you that it looks a little weird. But I also don't love the idea of using different styles in different rooms. Which is why I'm kind of questioning the feature altogether 😅 |
Haha yeah, I think we'd want to see these floating labels in those places to better make our decision. @MrMuzyk can you see if you can get the pill labels to show up in places like threads as well? |
Yeah right now I'm not totally sold that this is better than how we're currently doing it. |
I can look into this
This is weird because they are showing up for me when I'm running this locally. Screenshots below
Same case as above. It is working fine for me 🤔 When it comes to implementing floating indicators I've had a chat with @MrRefactor today and we both do not see the way of implementing indicators in the same manner as slack does in the current state of the app. The part where new indicator pushes the old one is the most complex bit that we don't know how to tackle. We both think that having opinion from someone who is more experienced with animations might be helpful - @WoLewicki |
Hey, is there a reason why I have been mentioned here? |
@WoLewicki Hey, @MrRefactor was working on a feature introducing date indicators and now I'm helping him with this as he's busy with RN upgrade. Some time ago there was a sugestion to create this in the same manner as slack is handling this. We have a |
Hey! I am no expert in this manner unfortunately 😅 I guess you could probably implement it as sticky headers? I can see there is an issue in Another approach with the current implementation would be to pass information about the current scroll offset and mimic the behavior of sticky headers the core (https://github.com/facebook/react-native/blob/cc99e924ca4f8d29cb6bf6bb5d2e180df541936a/packages/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js).
I think there are no hard limitations that could prevent us from doing it. |
Thanks for the input 👍 So the option with sticky headers was investigated but we can't go this path because of 2 reasons:
Custom solution might be the way to go if we want to implement it in the near future. It would also be great to have full requirements on how the date dividers should behave in multiple scenarios. I know that we have this gif showcasing how it works on slack but having a bit more than that would also help us decide on the possible approach in the future. @puneetlath @shawnborton |
My take is that given the complexity of trying to make the floating headers, we should just set this project aside for now. We have other more pressing concerns (e.g. performance) that I think we're better of focusing on. What do y'all think? |
@puneetlath I agree. I feel like the date headers don't work unless they're floating, and given what else is on our plate right now, it doesn't make a whole lot of sense to me to invest heavily in figuring that out. |
Yup, that makes sense and I agree with that. |
Ok thanks for your effort on this everyone! Closing out for now. |
Details
This PR concentrates on implementing Date dividers within chats to distinguish Today, Yesterday and other dates. We add an indicator between each day of the week that changes between messages, giving indication when that message was sent in an easy way.
Fixed Issues
$ #18101
PROPOSAL: #18101 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web-chrome.mov
safari-web.mov
MacOS: Desktop
desktop.mov