App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2022-10-31] [$250] Chat - Composer goes to the top on pressing expand @thesahindia

Open kbecciv opened this issue 2 years ago β€’ 24 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify.com
  2. Navigate to any chat
  3. Add few lines and press expand button at the left corner

Expected Result:

The composer should expand and shouldn't move

Actual Result:

The composer goes to the top

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • Desktop App
  • Mobile Web/safari

Version Number: 1.2.9.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/193113628-adebaae5-99be-46bc-9122-cc330a85022d.mp4

Expensify/Expensify Issue URL:

Issue reported by: @thesahindia

Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1664196729312989

View all open jobs on GitHub

kbecciv avatar Sep 29 '22 18:09 kbecciv

Triggered auto assignment to @laurenreidexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

melvin-bot[bot] avatar Sep 29 '22 18:09 melvin-bot[bot]

Proposal

It is happening because the ReportActionCompose is wrapped by OfflineWithFeedback https://github.com/Expensify/App/blob/b058975f68c53904a9724d1ccccb265f451f3649/src/pages/home/ReportScreen.js#L290-L296

To solve it we need to use style.h100 for the View at 90 and 92 We can pass styles for the first View using style but we will have to add another prop to pass style to 92 or we can just use styles.h100 or styles.flex1 because it's not breaking anything.

https://github.com/Expensify/App/blob/b058975f68c53904a9724d1ccccb265f451f3649/src/components/OfflineWithFeedback.js#L90-L94

Puneet-here avatar Sep 29 '22 20:09 Puneet-here

Triggered auto assignment to @amyevans (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

melvin-bot[bot] avatar Sep 30 '22 09:09 melvin-bot[bot]

Reproducible, releasing to External. A reminder @Puneet-here that you need to wait for the Help wanted label before submitting proposals, thanks! πŸ˜„

amyevans avatar Sep 30 '22 15:09 amyevans

Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Sep 30 '22 15:09 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

melvin-bot[bot] avatar Sep 30 '22 15:09 melvin-bot[bot]

Triggered auto assignment to @Beamanator (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Sep 30 '22 15:09 melvin-bot[bot]

Not overdue, reviewing this morning

laurenreidexpensify avatar Oct 03 '22 09:10 laurenreidexpensify

Yep ^ @rushatgabhane would you mind reviewing the one proposal in this issue today?

Beamanator avatar Oct 03 '22 09:10 Beamanator

https://www.upwork.com/jobs/~01b201949be1d1680f

laurenreidexpensify avatar Oct 03 '22 11:10 laurenreidexpensify

It is happening because the ReportActionCompose is wrapped by OfflineWithFeedback

@Puneet-here It is no longer the case in main. Could you please submit an updated proposal?

rushatgabhane avatar Oct 04 '22 10:10 rushatgabhane

@Beamanator apologies for the delay, im 100% back now

rushatgabhane avatar Oct 04 '22 10:10 rushatgabhane

Proposal

RCA: https://github.com/Expensify/App/blob/eb26cc45f36a01eb4bff7706ea13f0a77d015b5d/src/pages/home/report/ReportFooter.js#L89-L103 This happens because when composer expanded, the parent view (OfflineWithFeedback) doesn't stretch to full height so this.props.isComposerFullSize && styles.chatItemFullComposeRow in ReportActionCompose container style isn't applied so it doesn't stretch to full height.

Solution: We need to apply same conditional style to OfflineWithFeedback as in ReportActionCompose when expanded. OfflineWithFeedback is general component which is used throughout the app so style props should be passed

                            <OfflineWithFeedback
                                pendingAction={this.props.addWorkspaceRoomPendingAction}
+                               style={this.props.isComposerFullSize && styles.chatItemFullComposeRow}
+                               contentContainerStyle={this.props.isComposerFullSize && styles.flex1}
                            >
                                <ReportActionCompose
                                    onSubmit={this.props.onSubmitComment}
                                    reportID={this.props.report.reportID.toString()}
                                    reportActions={this.props.reportActions}
                                    report={this.props.report}
                                    isComposerFullSize={this.props.isComposerFullSize}
                                />
                            </OfflineWithFeedback>

And in https://github.com/Expensify/App/blob/main/src/components/OfflineWithFeedback.js,

        <View style={props.style}>
            {!hideChildren && (
-               <View style={needsOpacity ? styles.offlineFeedback.pending : {}}>
+               <View style={[needsOpacity ? styles.offlineFeedback.pending : {}, props.contentContainerStyle]}>
                    {children}
                </View>
            )}

aimane-chnaif avatar Oct 04 '22 11:10 aimane-chnaif

@aimane-chnaif's proposal is too similar to @Puneet-here's proposal.

And @Puneet-here most likely would have submitted an updated proposal same as @aimane-chnaif's proposal

rushatgabhane avatar Oct 04 '22 13:10 rushatgabhane

@Beamanator I think we should hire @Puneet-here because they were first.

C+ reviewed πŸŽ€ πŸ‘€ πŸŽ€

rushatgabhane avatar Oct 04 '22 13:10 rushatgabhane

Makes sense to me @rushatgabhane

Beamanator avatar Oct 04 '22 13:10 Beamanator

πŸ“£ @Puneet-here You have been assigned to this job by @Beamanator! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

melvin-bot[bot] avatar Oct 04 '22 13:10 melvin-bot[bot]

@Puneet-here's proposal didn't explain that those styles needed only when composer expanded (this.props.isComposerFullSize === true). WIthout this condition, it works on web but breaks style on mobile. Since this is important flag, I came to submit proposal though already proposal exists

aimane-chnaif avatar Oct 04 '22 14:10 aimane-chnaif

Agree with @aimane-chnaif, @Beamanator sorry for the back and forth but I think we should hire @aimane-chnaif

rushatgabhane avatar Oct 04 '22 15:10 rushatgabhane

Ooh thanks for bringing that up @aimane-chnaif , this one is tough since the proposal are both small, but I agree with @rushatgabhane let's change up who was hired πŸ‘

Beamanator avatar Oct 05 '22 14:10 Beamanator

πŸ“£ @aimane-chnaif You have been assigned to this job by @Beamanator! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

melvin-bot[bot] avatar Oct 05 '22 15:10 melvin-bot[bot]

Thanks @rushatgabhane @Beamanator PR is ready for review

aimane-chnaif avatar Oct 05 '22 15:10 aimane-chnaif

PR under review, should be merged soon πŸ‘

Beamanator avatar Oct 14 '22 13:10 Beamanator

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.2.18-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/11608

If no regressions arise, payment will be issued on 2022-10-31. :confetti_ball:

melvin-bot[bot] avatar Oct 24 '22 23:10 melvin-bot[bot]

Payments:

  • [x] @thesahindia issue reporter PAID
  • [x] @rushatgabhane Contributor Plus reviewer
  • [x] @aimane-chnaif Contributor

@rushatgabhane @aimane-chnaif as soon as you've accepted job in Upwork I will issue payment. Thanks

laurenreidexpensify avatar Oct 31 '22 11:10 laurenreidexpensify

Everyone has been paid πŸ‘

laurenreidexpensify avatar Oct 31 '22 14:10 laurenreidexpensify