Repository navigation
fix: Comments sub-header not shown in the chat - #74784
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
| const isFocused = useIsFocused(); | ||
| const shouldShowComments = hasComments || isLoadingReportActions; | ||
|
|
||
| const commentContainerStyle = useMemo(() => { |
There was a problem hiding this comment.
❌ PERF-6 (docs)
The useMemo hook uses entire style objects (styles.ph5, styles.justifyContentBetween, styles.mb2) as dependencies. This causes the memoization to be ineffective since style objects from useThemeStyles() are new object references on each render.
Issue: The memoization here doesn't provide any benefit and adds unnecessary computational overhead. Since these are static style values that create a simple array, memoization is not needed at all.
Suggested fix: Remove the useMemo entirely as it's unnecessary for static style arrays:
const commentContainerStyle = [styles.ph5, styles.justifyContentBetween, styles.mb2];Or if you truly need memoization (which is unlikely for this case), you would need to ensure styles is a stable reference or extract it outside the dependencies.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-11-12.at.00.37.20.movAndroid: mWeb ChromeScreen.Recording.2025-11-12.at.00.32.33.mp4iOS: HybridAppScreen.Recording.2025-11-12.at.00.31.31.mp4iOS: mWeb SafariScreen.Recording.2025-11-12.at.00.30.14.mp4MacOS: Chrome / SafariScreen.Recording.2025-11-12.at.00.19.47.mp4MacOS: DesktopScreen.Recording.2025-11-12.at.00.26.26.mp4 |
|
@nkdengineer There are still pipeline issue and bot review comments to address. Once those are resolved, we can add the Design label for the UI review. |
|
@suneox All done. |
|
@JmillsExpensify The PR is ready for an ad-hoc build for the @Expensify/design team to review the UI update — it now only shows the comment sub-header when there are no transactions and a comment message is present. |
|
Running build 👍 |
|
🚧 @dubielzyk-expensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
|
Adhoc build worked well to me 👍 |
JmillsExpensify
left a comment
There was a problem hiding this comment.
Changes look good from a product perspective.
|
✋ 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/roryabraham in version: 9.2.59-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.2.59-5 🚀
|
Explanation of Change
fix: Comments sub-header not shown in the chat
Fixed Issues
$ #73686
PROPOSAL: #73686 (comment)
Tests
Commentssub-header appearsOffline tests
Same
QA Steps
Commentssub-header appearsPR 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))npm run compress-svg)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