-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[hold for payment 2024-05-29][$250] Chat icons visible before input field renders #41397
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~012097aedd79eaa599 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The emoji and send icons become visible before the input field and then jump when the input field is shown. What is the root cause of that problem?This happens because the + icon and composer are inside AttachmentModal. This leads to an unnecessary increase in component nesting, while the emoji icon and send icon are outside the AttachmentModal so they display earlier. App/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx Lines 398 to 478 in 573d989
What changes do you think we should make in order to solve the problem?Move the below code inside AttachmentModal, so the emoji icon and send icon also work as children of AttachmentModal.
|
♻️ Reviewing proposal. |
@ShridharGoel Thanks for your proposal ! Your RCA is correct in the sense that some elements are rendered as children of When it comes to the proposed solution, because Tip Instead of moving the mentioned |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat icons appear to jump from left to right because the attachment picker button and the composer are loaded with delay What is the root cause of that problem?Composer and AttachmentPicker are inside the AttachmentModal so the icons are loaded quicker than the composer and attachment picker. What changes do you think we should make in order to solve the problem?I think the jumping of icons from left to right is what causing the bad look. We can position them at the right from the beginning by adding Instead of the above, we can add the justifyContentEnd to chatItemComposeBox hereLine 2034 in 1c651a1
It does not break anything because this style is used only from composer and edit composer. What alternative solutions did you explore? (Optional) |
ProposalUpdated based on @ikevin127's comment. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The add action button and the input itself is missing when opening a chat for the first time after killing the app. What is the root cause of that problem?The add button and the input/composer are wrapped with an AttachmentModal component. App/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx Lines 398 to 466 in f851f57
AttachmentModal connects to several onyx data, App/src/components/AttachmentModal.tsx Lines 615 to 634 in f851f57
as we (probably) know, withOnyx will render null if the data is not all ready yet. In our case, both parentReport and policy are not available yet. Also, if we open a non-policy chat, the add (+) button is still shown in delay because in AttachmentPickerWithMenuItems, we connect to policy data. App/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx Lines 330 to 334 in ee8f9c6
What changes do you think we should make in order to solve the problem?Reading through the code, both parentReport and policy actually in AttachmentModal aren't being used anymore. App/src/components/AttachmentModal.tsx Lines 415 to 418 in f851f57
App/src/components/AttachmentModal.tsx Line 457 in f851f57
The above code shows the only usage of both data. Both data are first added in #28373 to check whether the user can edit the receipt or not, but the condition ( For AttachmentPickerWithMenuItems, set the initial value of the policy to an empty object. What alternative solutions did you explore? (Optional)Set the initial value for both data in AttachmentModal as an empty object OR Replace useOnyx with withOnyx |
♻️ Reviewing proposals. |
@c3024 Thanks for your proposal. RCA:
Your RCA is partially correct, except the other way around. The components inside the AttachmentModal appear slower to load then the ones outside it. Regarding your solution: while it solves the positioning of the components outside of the AttachmentModal by keeping them at the right of the container instead of having them move from left to right, it still does not fix the issue as the icons inside the AttachmentModal are still appearing with delay (see attached video). Android: Native (OnePlus 7T - Android 14)proposal-2.mp4Note If you feel like I missed something from your proposal, please let me know and if the argument is solid I can reconsider assignment. |
@bernhardoj Thanks for your proposal. Part of RCA:
Your RCA is correct when it comes to the Regarding your solution: I tested it and there's still an issue with the Android: Native (OnePlus 7T - Android 14)proposal-3.mp4Note If you feel like I missed something from your proposal, please let me know and if the argument is solid I can reconsider assignment. |
Android: Native (OnePlus 7T - Android 14)proposal-1.mp4
|
Current assignee @Julesssss is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
Hmm, I don't see the + action button shown with delay. Screen.Recording.2024-05-03.at.13.58.18.movThe AttachmentPickerWithMenuItems is also connected with a policy data, but it's available when I log it, App/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.tsx Lines 330 to 334 in ee8f9c6
Can you test adding an initial value ({}) to it? EDIT: Ah, I can reproduce it if I open a non-related policy chat, so the onyx key will be policy_undefined. The initial value solution will fix it. Updated my proposal to include that. |
Thanks all, I'll let Kevin take another look at @bernhardoj's updated proposal before assigning. |
false alarm, just linking to a similar issue |
Given @bernhardoj's updated proposal, the RCA is correct and makes sense now! The updated solution targets the root cause of the issue and fixes it more efficiently then the previously selected proposal (see videos below). Android: Nativeandroid.mp4iOS: Nativeios.MP4Reasoning: The updated proposal completely removes the bottleneck which delayed the display of the child components within Why ? 🎀👀🎀 C+ reviewed |
Current assignee @Julesssss is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
waiting for sign off on proposal |
📣 @ikevin127 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready cc: @ikevin127 |
PR merged today! |
On staging |
|
Sounds good! We need to issue the following payments tomorrow:
|
All set to issue payment |
@bernhardoj $250 sent and contract ended! |
@ikevin127 $250 sent and contract ended! |
Upwork job closed. |
All set, thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.67-4
Action Performed:
Expected Result:
Actual Result:
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
InputButtons.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: