Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.03k stars 2.54k forks source link

Fix chat header appears after delay when opening expense/transaction report #42334

Closed bernhardoj closed 5 days ago

bernhardoj commented 2 weeks ago

Details

The delay is caused by the withOnyx returning null when the data are not ready yet. This PR migrates it to useOnyx hook.

Fixed Issues

$ https://github.com/Expensify/App/issues/41523 PROPOSAL: https://github.com/Expensify/App/issues/41523#issuecomment-2092814191

Tests

Same as QA Steps

Offline tests

Same as QA Steps

QA Steps

Prerequisite: have submitted more than 1 expense to anyone

  1. Login to the app
  2. Open the chat with more than 1 expense
  3. Press the report preview to open the expense/IOU report
  4. Verify the header shows along with other content such as the composer
  5. Press the money request preview to open the transaction thread
  6. Verify the header shows along with other content such as the composer
    • [x] Verify that no errors appear in the JS console

PR Author Checklist

Screenshots/Videos

Android: Native https://github.com/Expensify/App/assets/50919443/aa956105-d030-4f47-8f23-dc682d25df6f
Android: mWeb Chrome https://github.com/Expensify/App/assets/50919443/9f1a1e73-e778-4bc7-b8d7-ec87d443c92b
iOS: Native https://github.com/Expensify/App/assets/50919443/3df2d14e-274b-496c-af82-5add8e4bc7b9
iOS: mWeb Safari https://github.com/Expensify/App/assets/50919443/1859f910-af66-41f7-b87d-b985f582da29
MacOS: Chrome / Safari https://github.com/Expensify/App/assets/50919443/6f98afb6-a207-4cff-8d94-040c12cf5f24
MacOS: Desktop https://github.com/Expensify/App/assets/50919443/2289b8c1-2989-45f0-a7d7-9cf8e91e4eca
melvin-bot[bot] commented 2 weeks ago

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

DylanDylann commented 1 week ago

Reviewer Checklist

Screenshots/Videos

Android: Native https://github.com/Expensify/App/assets/141406735/e6dbff29-9840-4437-bc35-b241a7f81c56
Android: mWeb Chrome https://github.com/Expensify/App/assets/141406735/254dda58-b9ce-4c5f-ad61-068d544e5a7b
iOS: Native https://github.com/Expensify/App/assets/141406735/16a0a004-05a3-4987-a283-5cc1805a6cc9
iOS: mWeb Safari https://github.com/Expensify/App/assets/141406735/358c2101-e88e-462f-96a0-aff59850e4b1
MacOS: Chrome / Safari https://github.com/Expensify/App/assets/141406735/08346d98-9ea5-4f93-8cef-8f130e7e36cf
MacOS: Desktop https://github.com/Expensify/App/assets/141406735/5bc42ea8-73ba-490c-b337-08ac634fcb5d
DylanDylann commented 1 week ago

@bernhardoj Everything looks good. One minor thing, in the test step we should add the "Login" step as the first step

bernhardoj commented 1 week ago

Updated

DylanDylann commented 6 days ago

@bernhardoj Please resolve conflict

bernhardoj commented 6 days ago

There is no conflict

OSBotify commented 5 days ago

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

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…
OSBotify commented 3 days ago

πŸš€ Deployed to production by https://github.com/Beamanator in version: 1.4.76-7 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ