Make getReportDetails a pure function#61670
Conversation
|
@eVoloshchak 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] |
Reviewer Checklist
Screenshots/Videos |
For me, this already works correctly on staging (before fix). @cretadn22, are these steps supposed to fail on staging? |
|
@eVoloshchak This PR doesn't fix any bug, it is only a refactor. The above test step is only to verify that everything still works well after this change, we can skip the test steps if you want |
|
@cretadn22, according to #61049 (comment)
Is this a theoretical scenario? Or is there a set of steps we could perform to reproduce this bug? |
@eVoloshchak I can't see any problem. Do you have any idea? |
|
@cretadn22, I also can't find any scenario where UI would not be updated. Let's stick with the original test steps then. Could you pull the latest |
|
@eVoloshchak I merged the main |
|
Still experiencing a problem with HybridApp build (cannot properly test this on native platforms), expect an update shortly |
|
@cretadn22 TS checks are failing |
|
@luacmartins @tgolen I updated all comments |
| formattedName += ` (${translateLocal('common.archived')})`; | ||
| } | ||
| return formatReportLastMessageText(formattedName); | ||
| return formatReportLastMessageText(formattedName) ?? report?.reportName ?? ''; |
There was a problem hiding this comment.
Ah, dang. Sucks that this had to be added so many places. It would really help if this function only had one return, but that's not your fault.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.1.65-0 🚀
|
|
Changes from this PR in |
|
This PR caused regression #64031 |
|
@cretadn22 this PR was reverted because it caused these blockers:
@cretadn22 let's create a new PR to reimplement the changes in this PR, taking into account the issues above. Additionally, can we please include automated tests for these changes? |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.1.65-1 🚀
|






Explanation of Change
Fixed Issues
$ #61258
PROPOSAL: #61258 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop