App icon indicating copy to clipboard operation
App copied to clipboard

fix: Accounting - Unnecessary tooltip showing the same icon on export page.

Open Krishna2323 opened this issue 1 year ago β€’ 14 comments

Explanation of Change

  • Unnecessary tooltip was shown on an export icon.
  • Although shouldShowTooltip was correctly passed to MultipleAvatars, it wasn't passed further. This PR ensures that the shouldShowTooltip value is passed down to the UserDetailsTooltip and Tooltip components.

Fixed Issues

$ https://github.com/Expensify/App/issues/51656 PROPOSAL: https://github.com/Expensify/App/issues/51656#issuecomment-2444274359

Tests

Precondition:

  • A workspace with QBO or any accounting integration connected
  • An expense created and paid
  1. Go to transaction thread of the paid expense
  2. Click on header > Export
  3. Hover over the icon
  4. Verify no tooltip is shown
  • [x] Verify that no errors appear in the JS console

Offline tests

Precondition:

  • A workspace with QBO or any accounting integration connected
  • An expense created and paid
  1. Go to transaction thread of the paid expense
  2. Click on header > Export
  3. Hover over the icon
  4. Verify no tooltip is shown

QA Steps

Precondition:

  • A workspace with QBO or any accounting integration connected
  • An expense created and paid
  1. Go to transaction thread of the paid expense
  2. Click on header > Export
  3. Hover over the icon
  4. Verify no tooltip is shown

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • [x] Verify that no errors appear in the JS console

PR Author Checklist

  • [x] I linked the correct issue in the ### Fixed Issues section above
  • [x] I wrote clear testing steps that cover the changes made in this PR
    • [x] I added steps for local testing in the Tests section
    • [x] I added steps for the expected offline behavior in the Offline steps section
    • [x] I added steps for Staging and/or Production testing in the QA steps section
    • [x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • [x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • [x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • [x] I included screenshots or videos for tests on all platforms
  • [x] I ran the tests on all platforms & verified they passed on:
    • [x] Android: Native
    • [x] Android: mWeb Chrome
    • [x] iOS: Native
    • [x] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [x] MacOS: Desktop
  • [x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • [x] I followed proper code patterns (see Reviewing the code)
    • [x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • [x] I verified that comments were added to code that is not self explanatory
    • [x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • [x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • [x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • [x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • [x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • [x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • [x] I verified the JSDocs style guidelines (in STYLE.md) were followed
  • [x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • [x] I followed the guidelines as stated in the Review Guidelines
  • [x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • [x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • [x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • [x] I verified that if a function's arguments changed that all usages have also been updated correctly
  • [x] If any new file was added I verified that:
    • [x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • [x] If a new CSS style is added I verified that:
    • [x] A similar style doesn't already exist
    • [x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • [x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • [x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • [x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • [x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • [x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • [x] I verified that all the inputs inside a form are aligned with each other.
    • [x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • [x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • [x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/user-attachments/assets/c60de7cf-24f4-4604-b8bb-9642e05a33e7

Android: mWeb Chrome

https://github.com/user-attachments/assets/f2666a22-52a3-4307-b611-02cf5d085492

iOS: Native

https://github.com/user-attachments/assets/4b436933-b982-4c64-ab0d-426a3c0be210

iOS: mWeb Safari

https://github.com/user-attachments/assets/5f32e470-8c46-453e-ac17-bb0430e6710d

MacOS: Chrome / Safari

https://github.com/user-attachments/assets/1b6c5a01-1f61-4f7f-acf1-542a79a83c1d

MacOS: Desktop

https://github.com/user-attachments/assets/70d2ac89-e527-4560-8d4e-2293a048600b

Krishna2323 avatar Nov 12 '24 23:11 Krishna2323

@parasharrajat 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]

melvin-bot[bot] avatar Nov 12 '24 23:11 melvin-bot[bot]

I will get this tested by Monday. Thanks for waiting. Meanwhile, @Krishna2323 did you run tests to ensure the changes are not impacting the Avatar component in other places?

parasharrajat avatar Nov 15 '24 18:11 parasharrajat

@parasharrajat bump

Krishna2323 avatar Nov 19 '24 19:11 Krishna2323

@Krishna2323 Can you please update test steps to test all the places where avatar can be present? Let's try to cover most of them.

parasharrajat avatar Nov 20 '24 15:11 parasharrajat

BUG: ROOM avatar does not show tooltip on report header. BUG: ROOM avatar does not show tooltip on LHN. BUG: CHATs search does not show tooltip for some of the avatar at the end of list.

https://github.com/user-attachments/assets/38c162aa-ca11-4c96-9db0-280307d45eb7

parasharrajat avatar Nov 20 '24 15:11 parasharrajat

@parasharrajat, sorry for overlooking. I will soon check the bugs you mentioned.

Krishna2323 avatar Nov 20 '24 16:11 Krishna2323

@Krishna2323 Any updates?

parasharrajat avatar Nov 21 '24 16:11 parasharrajat

@parasharrajat,

ROOM avatar does not show tooltip on report header. ROOM avatar does not show tooltip on LHN.

  • It seems like the tooltip was intentionally disabled for room chats but it was showing because of the bug we are fixing. https://github.com/Expensify/App/blob/0e9f9346f46324e0b659f0cfcfbe476b85f9b8b0/src/pages/home/HeaderView.tsx#L203-L206 https://github.com/Expensify/App/blob/0e9f9346f46324e0b659f0cfcfbe476b85f9b8b0/src/components/LHNOptionsList/OptionRowLHN.tsx#L259 https://github.com/Expensify/App/blob/0e9f9346f46324e0b659f0cfcfbe476b85f9b8b0/src/libs/OptionsListUtils.ts#L1951-L1953

CHATs search does not show tooltip for some of the avatar at the end of list.

  • As mentioned in the BaseSelectionList component, we only want to show first 10 tooltips because of performance issue. Should we change this? https://github.com/Expensify/App/blob/075d46b5f0d8aec80c78a07603f58936c32ef8c0/src/components/SelectionList/BaseSelectionList.tsx#L491-L502

Krishna2323 avatar Nov 21 '24 18:11 Krishna2323

Thanks for looking into these. Can you please update the test steps to test all the places where avatar can be present? Let's try to cover most of them? I believe listing down those places will be enough instead of adding steps for all.

parasharrajat avatar Nov 22 '24 07:11 parasharrajat

@parasharrajat, I think we should get confirmation before changing the behavior. In my opinion, tooltips for rooms should be shown, as they are also helpful for viewing workspace name and tooltip for user profile is also helpful in viewing full details of users on the participants page. Showing tooltips for only the first 10 users doesn’t seem correct to me.

@thienlnam, could you please take a look?

https://github.com/user-attachments/assets/08ed4fd5-2c17-490a-8b0b-a98993736820

Krishna2323 avatar Nov 24 '24 11:11 Krishna2323

Looks fine to have shown on the rooms. Additionally, I don't have context on why we added the restriction to 10, perhaps it was a pre-optimization. We can remove it and always add it back if there's a big performance degredation

thienlnam avatar Nov 25 '24 22:11 thienlnam

@parasharrajat, I removed the condition to not show avatars for rooms and also removed the condition to show tooltips for only the first 10 items. The tests are passing, are we good to proceed?

Krishna2323 avatar Nov 26 '24 22:11 Krishna2323

Thanks for the changes. But I need to check the requirements for limiting tooltips up to 10 items.

parasharrajat avatar Nov 27 '24 08:11 parasharrajat

@parasharrajat @thienlnam, the performance tests are passing, and while testing the PR with a high-traffic account, I couldn't notice any difference in performance.

https://github.com/user-attachments/assets/1022db43-06a6-479d-bf9b-2c5aaec15a36

Krishna2323 avatar Dec 06 '24 19:12 Krishna2323

Screenshots

:black_square_button: iOS / native

https://github.com/user-attachments/assets/26bc8994-5986-4363-9a86-60f6554f8cc0

:black_square_button: iOS / Safari

https://github.com/user-attachments/assets/637b47ce-d59a-424f-a8fe-b3f5ec95aab2

:black_square_button: MacOS / Desktop

https://github.com/user-attachments/assets/24ceb692-55bb-473b-a2b1-32d06c05cf2d

:black_square_button: MacOS / Chrome

https://github.com/user-attachments/assets/fdafe3e2-f1c2-4547-8809-1c96c997400e

:black_square_button: Android / Chrome

https://github.com/user-attachments/assets/57e2033e-6330-49b3-94b4-a230fb8a573a

:black_square_button: Android / native

https://github.com/user-attachments/assets/4d3a066c-f7ca-428c-b2de-a510a63f4c32

parasharrajat avatar Dec 09 '24 19:12 parasharrajat

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

OSBotify avatar Dec 10 '24 02:12 OSBotify

πŸš€ Deployed to staging by https://github.com/thienlnam in version: 9.0.74-0 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…
πŸ€–πŸ”„ android HybridApp πŸ€–πŸ”„ success βœ…
πŸŽπŸ”„ iOS HybridApp πŸŽπŸ”„ success βœ…

github-actions[bot] avatar Dec 10 '24 23:12 github-actions[bot]

πŸš€ Deployed to production by https://github.com/luacmartins in version: 9.0.74-8 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…
πŸ€–πŸ”„ android HybridApp πŸ€–πŸ”„ failure ❌
πŸŽπŸ”„ iOS HybridApp πŸŽπŸ”„ success βœ…

github-actions[bot] avatar Dec 12 '24 01:12 github-actions[bot]