Skip to content
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

If user chat DM is open/idle and you receive new messages, there isn't a notification marker for the unread messages #4472

Closed
5 tasks done
Santhosh-Sellavel opened this issue Aug 6, 2021 · 37 comments

Comments

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Aug 6, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


No Indication of new messages in 1:1 Chat or Group chat.

Action Performed:

  1. Open any 1:1/group chat, wait for new messages from 1:1/group chat.
  2. When new messages are received, no sign for new messages

Let's say, we didn't notice the window for few minutes, there is no sign for a new message received.

Expected Result:

The new marker indication should be updated above the new messages.

Actual Result:

Nothing happened, no new marker indication at all.

New_Marker_issue.mov

Workaround:

If the user didn't wait on the specific chat, can see an indication while opening from chat list.

Suggestion:

We could show a new marker indicator on the chat window after receiving new messages. Like the One, we already show above the first new message received

Screenshot 2021-08-12 at 12 36 06 AM

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Proposal

Clarification It might look similar to #4357, but it's not ( because that was specific to mWeb or Mobile). And this issue is common to all platforms.

Why mention it here, because part of the solution for this is already proposed there. Refer Image Below
Screenshot 2021-08-07 at 2 37 16 AM

I give a PR Request right after #4357.

Solution for this,
Screenshot 2021-08-07 at 2 47 32 AM

if a new comment is added and is no new marker indicator, update the marker place.
If already shown, there is no need to update because the marker position needs to be above the oldest unread until switching the chat window.

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

@Santhosh-Sellavel Santhosh-Sellavel added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Aug 6, 2021
@MelvinBot
Copy link

Triggered auto assignment to @michaelhaxhiu (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 6, 2021
@parasharrajat
Copy link
Member

Why does a user need a new marker on an already active Chat?

@Santhosh-Sellavel
Copy link
Collaborator Author

I've left chat open if I didn't notice the window. It will be like nothing happened. @parasharrajat

@parasharrajat
Copy link
Member

Sure. Answering these types of questions helps others to understand why there is a problem. If you already have these points in mind, please put them in the details.

@Santhosh-Sellavel Santhosh-Sellavel changed the title New marker does not get updated if user chat window is already open. New marker does not get updated if user chat window is already open/idle. Aug 6, 2021
@MelvinBot
Copy link

@michaelhaxhiu Whoops! This issue is 2 days overdue. Let's get this updated quick!

@michaelhaxhiu
Copy link
Contributor

Will pick this up shortly

@MelvinBot MelvinBot removed the Overdue label Aug 10, 2021
@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Aug 11, 2021

@Santhosh-Sellavel can we update the GH body a little bit to cover the suggested sections more thoroughly? If you find and fix something, you get a bonus and so I'd like to make sure you follow best practices (so you can re-apply this to new Githubs you discover in the future).

A few pieces of feedback from me:

  1. Action Performed: - Can you please provide the steps?
  2. Actual Result: - Can you clarify if that is the actual result after you receive a DM? It's unclear right now when the actual result is produced, as the steps from 1 aren't provided.
  3. Workaround: - Would you agree the workaround is to simply scroll for now? This isn't super important for this issue, but for future github issues it's always good to fill this out too because it helps us choose the right priority level.
  4. Proposal - You can keep this section separate if you like, but can you please lay out the scenarios where you think the marker is missing (similar to how you did this github New Marker does not get updated properly while switching between same chat and chat list. #4357)? Also should it apply to 1:1 chats and Group chats? Let's say that if so.

@Santhosh-Sellavel
Copy link
Collaborator Author

@michaelhaxhiu First, Sorry for the inconvenience. I somehow missed uploading the file, got lost in the discussion after posting.

@Santhosh-Sellavel

This comment has been minimized.

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Aug 11, 2021

@michaelhaxhiu Update the Issue details.

One more thing, can we hide the new marker after the received user posts a reply, from that point it's understandable that the user read the chat why we still need to show it.

Post your thoughts & if I am missing something let me know. Thanks!

@michaelhaxhiu
Copy link
Contributor

@Santhosh-Sellavel no worries at all, it's my duty to make sure that this Github is reviewed for accuracy so that the scope is clearly defined (so you get a bonus for reporting the issue and fixing it 😃).

I really appreciate you filling out this GH proactively, and incorporating the feedback. It should be a little easier for you next time!

@michaelhaxhiu michaelhaxhiu changed the title New marker does not get updated if user chat window is already open/idle. If user chat DM is open/idle and you receive new messages, there isn't a notification marker for the unread messages Aug 11, 2021
@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Aug 11, 2021

I think it makes sense to stick with the existing theme we have when you have unreads and the DM is not idle/open:

image

@shawnborton since we worked on #4475 recently, and this is similar but not quite the same, I'd love your 2 cents. Do you agree with this theme? Going to apply the Design label and open to input from others.

@MelvinBot
Copy link

Triggered auto assignment to @megankelso (Design), see these Stack Overflow questions for more details.

@michaelhaxhiu
Copy link
Contributor

If we do go with this design theme above, @Santhosh-Sellavel when should we remove/clear the --------- NEW notification marker?

Would it be when the user scrolls all the way down?

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Aug 11, 2021

If we do go with this design theme above, @Santhosh-Sellavel when should we remove/clear the --------- NEW notification marker?

@michaelhaxhiu

First, This is what we actually do,
When user navigates to different chat/chatlist and come back NEW notification should be cleared.

Also additionally IMO We can do it just after posting a reply, because at some point new marker will go out of view after having few conversations. There will be no new marker at all (It will be there but hidden above messages).

Would it be when the user scrolls all the way down?

No definetly not.

Suggestion

Bestway is to give the user a option mark as read for all.

We should actually mark everything as read after opening closing/switching chats. But instead we should only mark comment as after its presented to the user.

@shawnborton
Copy link
Contributor

I agree, the existing New marker is what we should use. But just to make sure I am following, are you suggesting that we would do this if you receive new messages but the app was "in the background" so-to-speak?

@Santhosh-Sellavel
Copy link
Collaborator Author

I agree, the existing New marker is what we should use. But just to make sure I am following, are you suggesting that we would do this if you receive new messages but the app was "in the background" so-to-speak?

Not in background, app is in foreground but idle/unnoticed. When new message received there is no sign/notification for what are new message received.?

@shawnborton

@shawnborton
Copy link
Contributor

How will you determine if the app is in the foreground but idle?

@Santhosh-Sellavel
Copy link
Collaborator Author

How will you determine if the app is in the foreground but idle?

Are you asking in technical context?

@shawnborton
Copy link
Contributor

I think I am just generally curious how we accomplish this - how do we know if the user is actually idle if the window is in the foreground? Especially on devices where we might not detect any kind of mouse not moving, etc.

@shawnborton
Copy link
Contributor

Also - could you elaborate a little bit more on the problem you experienced? Were you using the app and someone sent you new messages that you did not notice?

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Aug 12, 2021

@shawnborton
Let's say user opened app in desktop. Opened a group/1:1 chat. Initially there are no new messages. User left the app open in foreground no interaction to app. A idle state unnoticed, when new messages received after a while there is no indication that a message is received.

Since app is left open - which is a foreground state. No notification will also be received.

@shawnborton
Copy link
Contributor

Cool, I understand what you are describing but I am curious how we would pull this off. How would you detect that the app is both in the foreground and idle?

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Aug 12, 2021

I think I am just generally curious how we accomplish this - how do we know if the user is actually idle if the window is in the foreground? Especially on devices where we might not detect any kind of mouse not moving, etc.

We could track last user interaction time
(I'll propose technical solution)

Let's say we keep 2 minutes
After two minutes if user did not interact.
We mark user state is idle.

When new message received, we could just check against the idle state, we can show new marker if user is idle.

@Santhosh-Sellavel
Copy link
Collaborator Author

@shawnborton What I proposed earlier it would not wait for any idle, when a new message receives we will just update new indicator.

@Santhosh-Sellavel
Copy link
Collaborator Author

@shawnborton But also do we need maintain new marker even after user replyed.

@shawnborton
Copy link
Contributor

So every new message that is received would have the "New" marker, even if you are actively viewing the chat?

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Aug 12, 2021

So every new message that is received would have the "New" marker, even if you are actively viewing the chat?

No only above the first received new message.

@shawnborton
Copy link
Contributor

Sorry, I think your comment here has me confused:

What I proposed earlier it would not wait for any idle, when a new message receives we will just update new indicator.

What do you mean by it would not wait for any idle?

@shawnborton
Copy link
Contributor

Also, I totally recognize that the back and forth here in GitHub might be a bit tedious - if you would like to, I encourage you to start this conversation in #expensify-open-source so we can chat there in real time!

@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Aug 16, 2021

Assigning shawn + me until these details are hammered out.

@Santhosh-Sellavel did you want to start a thread in #expensify-open-source to help clarify the details?

@michaelhaxhiu
Copy link
Contributor

We are attempting to determine the appropriate behavior/scope of the solution, and could benefit from internal engineering input before this job is created and assigned.

Slack thread here - https://expensify.slack.com/archives/C01GTK53T8Q/p1628782470250300

@MelvinBot
Copy link

Triggered auto assignment to @MariaHCD (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@MariaHCD
Copy link
Contributor

Posted a summary of my understanding on the Slack thread. We'll continue the conversation there.

@MariaHCD
Copy link
Contributor

The resolution in the Slack thread here:

  1. New logic to show new marker if user is scrolled up in chat history (no GH yet)
  2. No longer display new marker once user replies: Unread message indicator does not disappear after some time has passed #4718

So I suggest we close this issue and create a new one for #1 above @Santhosh-Sellavel

@Santhosh-Sellavel
Copy link
Collaborator Author

New logic to show a new marker if a user is scrolled up in chat history (no GH yet)

Raise here #4723

cc: @MariaHCD

@MariaHCD
Copy link
Contributor

Great, thanks @Santhosh-Sellavel. Closing this issue in favor of #4718 and #4723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants