-
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 2023-03-31] [$1000] Upload photo visible area is displayed as circle even though workspace image is square #15845
Comments
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~014be76ba771d0f991 |
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @arosiclair ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Upload photo visible area is displayed as circle even though workspace image is square What is the root cause of that problem?That circle mask comes from the 'ImageCropView.js' component as shown at line 74 So image crop view component will always show circle mask by default. So this is the root cause of the problem. App/src/components/AvatarCropModal/ImageCropView.js Lines 73 to 75 in 704d9b3
What changes do you think we should make in order to solve the problem?We have to invent one prop that will control either circle mask shown or not. e.g. Step1:
So we have to pass <AvatarWithImagePicker
..
showImageCropMask={false}
/> Step2: App/src/components/AvatarWithImagePicker.js Line 305 in 080e34b
So we have to forward const propTypes = {
/** Show image crop circle mask */
showImageCropMask: PropTypes.bool,
}
const defaultProps = {
...
showImageCropMask: true,
};
<AvatarCropModal
...
showImageCropMask={this.props.showImageCropMask}
/> Step3:
So we have to forward const propTypes = {
/** Show image crop circle mask */
showImageCropMask: PropTypes.bool,
}
const defaultProps = {
...
showImageCropMask: true,
};
<ImageCropView
...
showImageCropMask={props.showImageCropMask}
/> Step4: Within const propTypes = {
...
/** Show image crop circle mask */
showImageCropMask: PropTypes.bool,
}
const defaultProps = {
...
showImageCropMask: true,
};
<View style={[containerStyle, styles.l0, styles.b0, styles.pAbsolute]}>
{ props.showImageCropMask
&& <Icon src={Expensicons.ImageCropMask} width={props.containerSize} height={props.containerSize} />
}
</View> So this way it will not show circle mask for workspace image selection, but it will keep showing circle mask during profile image selection. What alternative solutions did you explore? (Optional)Instead of <View style={[containerStyle, styles.l0, styles.b0, styles.pAbsolute]}>
{ props.imageCropMaskType === `circle`
&& <Icon src={Expensicons.ImageCropMask} width={props.containerSize} height={props.containerSize} />
}
</View> So we have to decide props name and based on that we can render the mask. Core concept is to render mask according to our need based on the prop we decide, and we have to implement the logic accordingly within |
@parasharrajat can you please check out the proposal here? Callstack might want to work on this one if the proposal from @PrashantMangukiya wont be sufficient, thanks! |
I kind of prefer this solution if we could add a rounded square mask similar to how the output is rounded |
Checking it now. |
1️⃣ is preferable. They should be able to select the full image (minus the rounded edges). |
@PrashantMangukiya is it possible to pass the mask as prop to the ImageCropView? |
@parasharrajat Yes it is possible. I did quick implementation as below, it is working as expected. We have to define const propTypes = {
/** Image crop vector mask */
maskImage: PropTypes.func,
}
const defaultProps = {
maskImage: Expensicons.ImageCropMask,
};
<View style={[containerStyle, styles.l0, styles.b0, styles.pAbsolute]}>
<Icon src={props.maskImage} width={props.containerSize} height={props.containerSize} />
</View> So within <AvatarWithImagePicker
..
maskImage={Expensicons.Emoji} /** Temporary used emoji icon */
/> Thanks. |
Ok, then @PrashantMangukiya 's proposal looks good for 1️⃣ in #15845 (comment). There won't be any calculation changes as we are already calculating things based on the full width of the container. cc: @arosiclair 🎀 👀 🎀 C+ reviewed |
Cool lets go with @PrashantMangukiya's proposal with the alternative |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.88-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-03-31. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Ping for Upwork |
Partially filled out the checklist above |
Regression test Steps
Do you agree 👍 or 👎 ? |
@parasharrajat please correct this
to this
|
Payments to be made: Mar 14 - @PrashantMangukiya was been assigned to this job No bonus payout |
I think we can just update specifically these steps to account for the rounded square |
@dhanashree-sawant - invited to Upwork Job Once those are accepted I can process payments |
@abekkala Offer accepted on Upwork. Thank you. |
@PrashantMangukiya Paid and contract ended - thank you! |
@abekkala Thanks, I have accepted the invite |
@dhanashree-sawant paid and contract ended - thank you! |
@parasharrajat paid and contract ended - thank you! |
We're all set here - closing. |
@parasharrajat and @PrashantMangukiya I was actually just reviewing this and you do get the 50% bonus. (I'm sorry I was counting assignment to production days vs. assignment to merge) |
@parasharrajat and @PrashantMangukiya I've just created another job listing just for this bonus pay out |
Thanks @abekkala Accepted. |
Thanks @abekkala Accepted offer. |
@parasharrajat and @PrashantMangukiya bonus payouts sent! Sorry about that! 😅 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Shape of upload photo visible area should square like the workspace image
Actual Result:
Shape of upload photo visible area is circular even though workspace image is square
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.82-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
workspace.image.visible.area.mp4
Recording.1673.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678377109201399
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: