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

[HOLD for payment 2022-11-16] [$500] Draft messages jump around in the LHN when accessed a second time #11330

Closed
kbecciv opened this issue Sep 27, 2022 · 59 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Sep 27, 2022

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


Issue found when executing PR #11211

Action Performed:

  1. Go to staging.new.expensify.com
  2. Login with the expensifail account
  3. Make sure you are in default view mode
  4. Add a draft to a chat
  5. Verify its position in the LHN doesn't change
  6. Select a different chat
  7. Verify that the previous draft chat moves up to the top of the LHN to be grouped with other draft chats
  8. Select the previous draft chat again

Expected Result:

Draft chat stays at the top of the LHN

Actual Result:

Draft chat jumps down to it's original position

Workaround:

Unknown

Platform:

Where is this issue occurring?

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

Version Number: 1.2.7.1

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any

Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

View all open jobs on GitHub

Screen.Recording.2022-09-27.at.12.41.04.PM.mov
@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2022

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

@tgolen
Copy link
Contributor

tgolen commented Sep 27, 2022

I just tested this on staging and cannot reproduce. You can see here how the draft reports are all listed alphabetically:

image

@roryabraham
Copy link
Contributor

I did some testing on mobile web and found that reports with draft comments appeared in the correct alphabetical order. However, this did not happen until I opened a different report and came back to the LHN, which is actually the same bug report as #11332

I think that this:

We purposefully don't change the order of the active chat when adding drafts (to keep the LHN from jumping around, which can be jarring to the user).

Makes sense on wide screens, but provides a UX that's not ideal on narrow screens (i.e: you come back to the LHN after writing a draft comment and the report is not pinned to the top in alphabetical order)

@tgolen
Copy link
Contributor

tgolen commented Sep 27, 2022

Yes, maybe that's so, but to me, that's a very separate discussion.

@roryabraham
Copy link
Contributor

roryabraham commented Sep 27, 2022

I also notice that when you click on a report with a draft comment, it jumps down to its previous unpinned position

Screen.Recording.2022-09-27.at.12.41.04.PM.mov

@grgia
Copy link
Contributor

grgia commented Sep 29, 2022

I cannot reproduce the alphabetical order bug nor the drafted chat jumping down in staging. Are you still able to reproduce that one @roryabraham ? If not, I think I'll close this out.

@roryabraham
Copy link
Contributor

Yes, I'm still able to reproduce this in 1.2.10-0:

  1. Select a chat with someone in the middle of your LHN
  2. Draft a message
  3. Click on another user in your LHN. The report with the draft message will jump to the top
  4. Click back on the report with the draft message. It will jump back down to where is was before

@grgia
Copy link
Contributor

grgia commented Sep 30, 2022

I updated staging to 1.2.11-0 and I was able to reproduce the drafted message jumping. However, I'm not sure what the expected result would be here. Should it stick to the top until a message is sent or deleted (/when chat input is cleared)?

@melvin-bot melvin-bot bot added the Overdue label Oct 3, 2022
@tgolen
Copy link
Contributor

tgolen commented Oct 3, 2022

I can also reproduce the draft message jumping back to its original position. I need to think about how this should be handled. I think we want:

  1. When you add a draft, the chat stays in the same place in the LHN
  2. When you go to another chat, the draft report should move up to the top of the LHN
  3. When you go to the draft report again, it should stay at the top of the LHN

The logic in the code makes sense why it's jumping back to its original position (because if it's the active report, it won't be included in the group of drafted reports). So I need to consider how to make an exception for this UX.

The easiest solution is to change the ideal UX slightly so that the first point is:

  1. When you add a draft, the chat jumps to the top of the LHN and then stays there

@tgolen tgolen changed the title Web - Chat -Drafted messages does not sort with alphabetical order Draft messages jump around in the LHN when accessed a second time Oct 3, 2022
@tgolen
Copy link
Contributor

tgolen commented Oct 3, 2022

@roryabraham Maybe that solution also solves your concern here:

Makes sense on wide screens, but provides a UX that's not ideal on narrow screens (i.e: you come back to the LHN after writing a draft comment and the report is not pinned to the top in alphabetical order)

@grgia
Copy link
Contributor

grgia commented Oct 3, 2022

I would agree with that solution! In that case, I'm going to move this onward and apply the external label / unassign.

@melvin-bot melvin-bot bot removed the Overdue label Oct 3, 2022
@grgia grgia added the External Added to denote the issue can be worked on by a contributor label Oct 3, 2022
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2022

Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 3, 2022
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2022

Triggered auto assignment to @deetergp (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot changed the title Draft messages jump around in the LHN when accessed a second time [$250] Draft messages jump around in the LHN when accessed a second time Oct 3, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 4, 2022

BugZero Checklist: The PR fixing this issue has been merged! The following checklist will need to be completed before the issue can be closed:

  • [@deetergp] A regression test has been added or updated so that the same bug will not reach production again. Link to the updated test here: https://github.com/Expensify/Expensify/issues/243871
  • The PR that introduced the bug has been identified. Link to the PR: Kill currentlyViewedReportID #11450
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • A discussion in #contributor-plus has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • Payment has been made to the issue reporter (if applicable)
  • Payment has been made to the contributor that fixed the issue (if applicable)
  • Payment has been made to the contributor+ that helped on the issue (if applicable)

@mallenexpensify mallenexpensify removed their assignment Nov 9, 2022
@mallenexpensify mallenexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Nov 9, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 9, 2022

Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 9, 2022
@mallenexpensify
Copy link
Contributor

@NicMendonca Reassigning as I'm heading OOO for a month

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Third week) Are we ok to close this?

@mananjadhav
Copy link
Collaborator

@mvtglobally the PR is yet to hit production.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Nov 9, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 9, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.25-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2022-11-16. 🎊

@melvin-bot melvin-bot bot changed the title [$500] Draft messages jump around in the LHN when accessed a second time [HOLD for payment 2022-11-16] [$500] Draft messages jump around in the LHN when accessed a second time Nov 9, 2022
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Fourth week)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 16, 2022
@mananjadhav
Copy link
Collaborator

@NicMendonca Quick bump on the Upwork payment here.

@NicMendonca
Copy link
Contributor

@mananjadhav @rawalyogendra paid, thanks!

@mananjadhav
Copy link
Collaborator

Thanks @NicMendonca

@rawalyogendra
Copy link
Contributor

Thank you @NicMendonca

@deetergp
Copy link
Contributor

Anyone know off the top of their heads which PR might have caused this regression?

@deetergp
Copy link
Contributor

This PR was the last to touch the line that @rawalyogendra's PR fixed and seems a likely culprit.

@deetergp
Copy link
Contributor

Also, I don't know who needs to hear this, but git log -p --follow -- <file whose history you want to search> is :chefkiss:

@melvin-bot melvin-bot bot added the Overdue label Nov 21, 2022
@NicMendonca
Copy link
Contributor

okay all set, thanks @deetergp!

@melvin-bot melvin-bot bot removed the Overdue label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests