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

LHN: Hide the pencil icon when message is sent or draft is deleted and show the icon when user started to type #6050 #6084

Merged
merged 9 commits into from
Nov 3, 2021

Conversation

marktoman
Copy link
Contributor

@marktoman marktoman commented Oct 27, 2021

Details

The pencil icon should not be visible when there is no draft in the report.

Show the pencil icon whenever users creates the draft (immediately) and hide the pencil icon as soon as the draft is either deleted or message sent (also immediately). However, keep the LHN reordering same, we do not want the LHN to reorder while typing as that is very distracting.

Fixed Issues

$ #6050

Tests and QA

Web, Desktop

Note: The pencil icon change is instant.

Actions
  • Action 1: Type text in the chat without sending it.
    Result: Once you start typing, the pencil icon appears and remains visible on the contact in LHN. The order of the LHN items does not change.

  • Action 2: Type something in the chat and send it.
    Result: The pencil icon appears as you type and disappears once you have sent it. The LHN order will change if not the topmost contact.

  • Action 3: Type text in the chat positioned in the middle of LHN. Click on another contact.
    Result: The pencil icon remains visible while the LHN order changes.

  • Action 4: Have text in the chat and delete it.
    Result: The pencil icon disappears while the LHN may re-order. All re-order cases are reproducible with other actions.

  • Action 5: Type text in the chat positioned in the middle of LHN. Reload the page.
    Result: Contact appears at the top.

  • Action 6: (Depends on the previous step.) Delete the text for that contact.
    Result: Contact appears in the middle again.

  • Action 7: Type text in the chat positioned in the middle of LHN. Receive a message from another contact positioned below the contact with a draft.
    Result: LHN order updates.

Mobile Web, Android, iOS

Actions:

Repeat each desktop action but open LHN after each change.
Result: LHN is invisible when typing and always re-orders when visible.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Issue-6050-web.mp4

Mobile Web

Issue-6050-Mobile-1.mp4

Desktop

iOS

Android

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2021

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

@marktoman
Copy link
Contributor Author

recheck

@marktoman
Copy link
Contributor Author

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

@marktoman
Copy link
Contributor Author

recheck

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.

@marktoman That's it for now, I really like this work, but we need to make sure no regressions come in. Great work so far. Can you please address the comments I left and we can give it another look once those are addressed. Thank you very much for taking this one on!

src/pages/home/report/ReportActionCompose.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
@marktoman
Copy link
Contributor Author

marktoman commented Oct 30, 2021

@mountiny Thanks for your suggestions, I have fixed all the issues.

@parasharrajat
Copy link
Member

@marktoman Could you please update videos for all platforms and fill in the testing steps?

Suggestion: Please mark this PR ready for review, if you think this is ready. A draft PR usually means you are still working.

@marktoman
Copy link
Contributor Author

@parasharrajat I would rather let @mountiny confirm he has no changes in mind before marking it ready for merge.

@mountiny
Copy link
Contributor

@marktoman Thank you very much for addressing my comments. In general, we have draft PRs only for when WIP and once ready for review (which this PR already was wirth the first iteration), contributor then makes the PR ready for review. Here is the dedicated part of Contributor guidelines.

So @parasharrajat was correct, feel free to take this PR from draft state to "normal" state 😅 also beware you can trust @parasharrajat in terms of processes in this repository basically as much as any Expensify engineer :) Rajat also might be reviewing some of your next PRs before some Expensify engineer will get their hands on it.

I will try to have a look into this soon so we can fix this asap :)

@mountiny mountiny self-requested a review October 30, 2021 17:13
@mountiny
Copy link
Contributor

@marktoman Additionally, to make this PR ready for review, you should fill in the appropriate sections of PR body. It is a bit tedious especially at the start to take screen recordings on all the platforms, but it is a process we require and which makes sure we test the change on all platforms. Also fill in the QA steps which our QA team could follow once this is deployed to staging. Thank you!

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.

@marktoman That is it for me, great job on this not easy PR and considering this is your first job here, definitely not one of the easier to start with.

Do not hesitate to ask any questions :) I am here to help!

src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
@mountiny mountiny self-requested a review November 2, 2021 12:12
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.

Any updates here @marktoman, if you have any questions, do not hesitate to ask :)

@marktoman marktoman marked this pull request as ready for review November 2, 2021 18:06
@marktoman marktoman requested a review from a team as a code owner November 2, 2021 18:06
@botify botify requested a review from mountiny November 2, 2021 18:06
@MelvinBot MelvinBot requested review from mountiny and removed request for a team and mountiny November 2, 2021 18:06
@marktoman
Copy link
Contributor Author

@parasharrajat Status changed, my mistake.

@mountiny Done. Thank you for the quick review on Saturday and apologies for missing some of the docs. I finally had time to read everything in detail over the weekend. I am not sure what to do about commit signing at this point?

@parasharrajat @mountiny Video for each platform - sadly no luck after a lot of effort trying to run the app natively. The only thing that works is npm run web via WSL, everything else fails. Expo works natively just fine. It seems that Windows as a dev environment is simply not supported. I was hoping to solve future mobile issues locally on Android and then verify via Mac In Cloud on the missing platforms.

I have added steps and a video for both web and mobile web, capturing all LHN use cases.

@mountiny
Copy link
Contributor

mountiny commented Nov 3, 2021

I am not sure what to do about commit signing at this point

@marktoman Not sure what you mean by this. It appears to me that the commits from you are verified, which is good :)

@marktoman First things first, please, pull main and merge the most recent code as it seems we have merge conflict there. I will review the code now.

We are aware that there might be some problems developing on Windows. I am not totally knowledgeable in terms of how our contributors who do not own Mac do this, but surely there is many of them. Being you, feel free to ask in the Slack channel and someone will be able to help you/give you tips and advice as we require to test the PRs on all platforms usually.

In this case we can safely assume the solution should behave same on mobile as on web as the change is mostly in the back logic.

@marktoman
Copy link
Contributor Author

@mountiny Merged. OK, thanks for the advice.

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.

@marktoman I tested it again and seems to me it works as expected. Thank you very much for including the detailed QA steps and the videos.

This is really great work and I think this should be my last changes requested. Really solid work here, Marek!

One comment for future regarding our PR body template. We use some automated processes based on webhooks to help us manage this repository and for that it is crucial to link the issue to PR which resolve it correctly and that is with the dollar sign and full URL. I noticed you have deleted the dollar sign from the template and left just the link. I have fixed it but just wanted to give you heads up for future PRs :) Thank you 🙇

The correct linking should look like: $ https://github.com/Expensify/App/issues/6050

src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
src/pages/home/sidebar/SidebarLinks.js Outdated Show resolved Hide resolved
@mountiny mountiny self-requested a review November 3, 2021 21:57
@marktoman
Copy link
Contributor Author

marktoman commented Nov 3, 2021

@mountiny Alright, thank you for the guidance and overall handling of the issue!

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.

@marktoman No, thank you :) I hope to see many more PRs from you 🎉 Waiting for the E2E tests before merging.

@marktoman
Copy link
Contributor Author

@mountiny Let's hope! Is the issue now considered finished so I can solve the other ones?

@mountiny mountiny merged commit dc67437 into Expensify:main Nov 3, 2021
@OSBotify
Copy link
Contributor

OSBotify commented Nov 3, 2021

@marktoman, Great job getting your first Expensify/App pull request over the finish line! 🎉

I know there's a lot of information in our contributing guidelines, so here are some points to take note of 📝:

  1. Now that your first PR has been merged, you can be hired for another issue. Once you've completed a few issues, you may be eligible to work on more than one job at a time.
  2. Once your PR is deployed to our staging servers, it will undergo quality assurance (QA) testing. If we find that it doesn't work as expected or causes a regression, you'll be responsible for fixing it. Typically, we would revert this PR and give you another chance to create a similar PR without causing a regression.
  3. Once your PR is deployed to production, we start a 7-day timer ⏰. After it has been on production for 7 days without causing any regressions, then we pay out the Upwork job. 💰

So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! 😊

@OSBotify
Copy link
Contributor

OSBotify commented Nov 3, 2021

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

@marktoman
Copy link
Contributor Author

@mountiny @OSBotify I have my answer :)

@mountiny
Copy link
Contributor

mountiny commented Nov 3, 2021

@marktoman As the handy comment above mentions, you can now be hired for other jobs :) But still one at a time, just to make sure you are able to update the PRs in timely manner (we expect addressing changes requested in PR reviews in ~2 days usually, if you can't update for whatever reason, let the engineer working on the issue with you know you will have delay)

@OSBotify
Copy link
Contributor

OSBotify commented Nov 4, 2021

🚀 Deployed to staging by @mountiny in version: 1.1.13-3 🚀

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

@mountiny
Copy link
Contributor

mountiny commented Nov 5, 2021

@marktoman a regression from this issue here: https://expensify.slack.com/archives/C01GTK53T8Q/p1636082766011900

After signing out, there is a blank page as SidebarLinks line 113 the unreadActionCount is undefined.

Can you please look into this and try to fix it? Thank you

@stitesExpensify
Copy link
Contributor

stitesExpensify commented Nov 5, 2021

Here's another related issue for that ^ #6228 (comment)

@mountiny
Copy link
Contributor

mountiny commented Nov 5, 2021

Thanks @stitesExpensify! There is a PR up which will fix it, I will tag you for a review to speed it up!

@mountiny
Copy link
Contributor

mountiny commented Nov 5, 2021

PR fixing this regression is up here.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Jag96 in version: 1.1.14-4 🚀

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

@ogumen
Copy link

ogumen commented Nov 21, 2021

The accessibility issues found in this PR:

  1. The issue [med] Color Contrast: Chat: Grey icons on grey background fail color contrast requirements #5651 is still reproducible.
  2. Selecting a chat from the list using Enter key adds a new line in the message text field - failure of WCAG SC 2.1.1
    https://user-images.githubusercontent.com/88733897/142771763-71523e04-9af3-457b-adb7-ba08883e5cca.mp4

@mountiny
Copy link
Contributor

@ogumen Thank you very much for this feedback. For @marktoman, these issues are not regressions from this PR so no need to worry about that.

I will create issue for the second issue mentioned here as well.

@mountiny
Copy link
Contributor

Issue created here: #6386

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.

6 participants