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

Prioritize reports with draft comments in the Most Recent priority mode #4873

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

meetmangukiya
Copy link
Contributor

@meetmangukiya meetmangukiya commented Aug 27, 2021

Details

Prioritizing reports with draft comments on LHN over no priority reports. After this change the priority is Pinned > IOUs > Drafts > everything else.

Fixed Issues

$ #4615

Tests

  1. Open any report / chat and start writing a message, but don't send it, hold on a few seconds
  2. Verify that the reports list in LHN gets reordered and reports with drafts appears before normal reports but after Pinned and IOUs.

QA Steps

  1. Open any report / chat and start writing a message, but don't send it, hold on a few seconds
  2. Verify that the reports list in LHN gets reordered and reports with drafts appears before normal reports but after Pinned and IOUs.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

image

Mobile Web

simulator_screenshot_32CDE90F-369B-4CC5-B421-3796F690EB46

Desktop

Screenshot 2021-08-27 at 3 13 53 PM

iOS

Simulator Screen Shot - iPhone 12 - 2021-08-27 at 15 23 51

Android

Not been able to get android setup running yet on m1

@meetmangukiya meetmangukiya requested a review from a team as a code owner August 27, 2021 10:59
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@MelvinBot MelvinBot requested review from mountiny and removed request for a team August 27, 2021 11:00
@meetmangukiya
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@meetmangukiya
Copy link
Contributor Author

recheck

1 similar comment
@meetmangukiya
Copy link
Contributor Author

recheck

@mountiny mountiny requested a review from iwiznia August 27, 2021 11:56
@mountiny
Copy link
Contributor

@iwiznia Requested a review from you as well, since you have reviewed the original proposal.

@@ -467,7 +471,15 @@ function getOptions(reports, personalDetails, draftComments, activeReportID, {
}
}

// If we are prioritizing IOUs the user owes, add them before the normal recent report options
// If we are prioritizing reports with draft comments, add them before the normal recent report options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, drafts will be at the very top, right? I wonder if that's what we want or we rather have IOUs/pinned/defaults.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, maybe I am wrong, the test seems to contradict me?

Copy link
Contributor

@mountiny mountiny Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and seems good to me function-wise 👍
Edit: Wrong picture here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no draft there 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, had it there a sec before taking the screenshot, hold on haha

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There we go:
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I figured out this works because we always prepend the arrays, so first one we do is last.

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM!

Great job @meetmangukiya for your first PR in this repo! 🎉

@@ -467,7 +471,15 @@ function getOptions(reports, personalDetails, draftComments, activeReportID, {
}
}

// If we are prioritizing IOUs the user owes, add them before the normal recent report options
// If we are prioritizing reports with draft comments, add them before the normal recent report options
Copy link
Contributor

@mountiny mountiny Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and seems good to me function-wise 👍
Edit: Wrong picture here.

@iwiznia iwiznia merged commit 7e926e1 into Expensify:main Aug 27, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@meetmangukiya
Copy link
Contributor Author

This already got merged 😄 🎉 !! Thanks for the quick reviews @iwiznia @mountiny!!

@mountiny
Copy link
Contributor

@meetmangukiya No problem! I assume you have not been hired on Upwork yet. Jason is based in US West Coast so he should get around to hire you.

Although, I am not sure if you have done it as this is your first PR here, have you sent a proposal for the Upwork job posting inside Upwork? Here is the job posting.

@mountiny
Copy link
Contributor

Sorry, let's bring this discussion to the original issue!

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @iwiznia in version: 1.0.88-3 🚀

platform result
🤖 android 🤖 cancelled 🔪
🖥 desktop 🖥 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Sep 1, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.90-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

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

Successfully merging this pull request may close these issues.

4 participants