Migrate ComposerWithSuggestions to useOnyx#51573
Conversation
|
@blazejkustra Thanks for the PR. I will pick this up for review today |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safari51573-web-safari-001.mp4Android: Native51573-android-native-001.mp4iOS: mWeb Safari51573-mweb-safari-001.mp4Android: mWeb Chrome51573-mweb-chrome-issue-001.mp4iOS: Native51573-ios-native-002.mp4MacOS: Desktop51573-desktop-001.mp4 |
|
@blazejkustra The PR tests well on all platforms except on mweb chrome where the app crashes. Here are the test videos and the test steps: Note: This issue is observed in mweb chrome platform.
This PR51573-mweb-chrome-issue-002.mp4Main-v9.0.56-29-0-56-2-main-issue.mp4 |
As this bug can be reproduced even on the latest main .i.e. 9.0.56-7, I have reported this in the expensify-bugs slack channel here. |
|
My sources tell me it should be fixed with Expensify/react-native-live-markdown#531 😄 If it's unrelated to this PR, let's proceed with review @rojiphil |
Yeah. Let's proceed since it is fixed elsewhere. Apart from this issue, the code works well. Thanks. |
lakchote
left a comment
There was a problem hiding this comment.
Thanks for your work @blazejkustra, and thanks for your thorough review @rojiphil.
LGTM.
|
✋ 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/lakchote in version: 9.0.57-0 🚀
|
| const [modal] = useOnyx(ONYXKEYS.MODAL); | ||
| const [preferredSkinTone = CONST.EMOJI_DEFAULT_SKIN_TONE] = useOnyx(ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE, {selector: EmojiUtils.getPreferredSkinToneIndex}); | ||
| const [editFocused] = useOnyx(ONYXKEYS.INPUT_FOCUSED); | ||
| const [parentReportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, {canEvict: false, initWithStoredValues: false}); |
There was a problem hiding this comment.
@blazejkustra I think we have a blocker issue here if parentReportID is undefined in which case the app will crash. We can reproduce this if we search for a chat with a user for whom there is no report present locally. Here is a screenshot of the crash.
@lakchote Not sure if we can have a fix soon for this. Otherwise we will have to revert the PR as this will be a blocker. Sorry for the inconvenience caused.
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.57-10 🚀
|

Details
Initial focus for this PR was to fix performance tests, particularly one case '[ReportActionCompose] press add attachment button'. However during this week another PR was merged in #51461, which removed the above test.
Fixed Issues
$ #51562
PROPOSAL: N/A
Tests
Testing Emoji Suggestions:
Testing Mention Suggestions:
Composeroverall, select emojis, try different styles (header, code, inline code etc), send messageOffline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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.webm
Android: mWeb Chrome
iOS: Native
ios.mp4
iOS: mWeb Safari
ios-web.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-10-31.at.08.42.19.mov
MacOS: Desktop
desktop.mov