Skip to content
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 2022-05-20] Feature Request: Add the ability to view profile pictures in full screen/larger size by clicking/tapping on them #8197

Closed
mvtglobally opened this issue Mar 17, 2022 · 44 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Design Engineering External Added to denote the issue can be worked on by a contributor

Comments

@mvtglobally
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Problem:

@garrett has what looks like an old timey phone and maybe some sort of necklace on in his picture, but I just can’t make it out!

Solution:

Let me tap on Garrett’s profile picture to get a good look at this crazy critter.

Action Performed:

  1. Navigate to any chat
  2. Click on user to open details
  3. View avatar

Expected Result:

User should be able to view profile pictures in full screen/larger size by clicking/tapping on them

Actual Result:

User can't view profile pictures in full screen/larger size

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.43-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

image - 2022-03-17T021218 985

Expensify/Expensify Issue URL:
Issue reported by: @twisterdotcom
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1646994875559189

View all open jobs on GitHub

@mvtglobally mvtglobally added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Mar 17, 2022
@MelvinBot
Copy link

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

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Mar 17, 2022
@sonialiap sonialiap removed their assignment Mar 18, 2022
@melvin-bot
Copy link

melvin-bot bot commented Mar 18, 2022

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

@timszot timszot removed their assignment Mar 21, 2022
@timszot timszot added the External Added to denote the issue can be worked on by a contributor label Mar 21, 2022
@melvin-bot
Copy link

melvin-bot bot commented Mar 21, 2022

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

@dylanexpensify
Copy link
Contributor

@MelvinBot MelvinBot removed the Overdue label Mar 21, 2022
@botify botify removed the Daily KSv2 label Mar 21, 2022
@MelvinBot MelvinBot added the Weekly KSv2 label Mar 21, 2022
@melvin-bot
Copy link

melvin-bot bot commented Mar 21, 2022

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

@MelvinBot
Copy link

📣 @parasharrajat You have been assigned to this job by @melvin-bot[bot]!
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 melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 21, 2022
@melvin-bot
Copy link

melvin-bot bot commented Mar 21, 2022

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

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 21, 2022
@parasharrajat
Copy link
Member

@Expensify/design What are the design expectations for this feature? Thanks.

@tomivs
Copy link
Contributor

tomivs commented Mar 21, 2022

internal: https://www.upwork.com/ab/applicants/1505964204060225536/job-details external: https://www.upwork.com/jobs/~01683d91a542e809a5

For this, we just have to add a modal component — which would contain the picture in full screen mode — and a click event that changes the state to show that modal.

Here is a prototype:
https://user-images.githubusercontent.com/6005972/159367991-49bcfbda-ab81-43d5-897b-a1bbf0dd0980.mp4

I'll be attentive to any comments and start working on this issue if my proposal if accepted.

Thanks.

@sobitneupane
Copy link
Contributor

Proposal:
We can make use of existing AttachmentModal for this.
Wrap this code block with AttachmentModal.

<Avatar
containerStyles={[styles.avatarLarge, styles.mb3]}
imageStyles={[styles.avatarLarge]}
source={details.avatar}
/>

<AttachmentModal
    sourceURL={details.imageUrl}
    isAuthTokenRequired
    displayName= {isSMSLogin ? props.toLocalPhone(details.displayName) : details.displayName}
    isProfilePicture
>
    {({show}) => (
        <TouchableWithoutFocus
            style={styles.noOutline}
            onPress={show}
        >
            <Avatar
                containerStyles={[styles.avatarLarge, styles.mb3]}
                imageStyles={[styles.avatarLarge]}
                source={details.avatar}
            />
        </TouchableWithoutFocus>
    )}
</AttachmentModal>

Add a prop isProfilePicture in AttachmentModal.

<HeaderWithCloseButton
title={this.props.isUploadingAttachment
? this.props.translate('reportActionCompose.sendAttachment')
: this.props.translate('common.attachment')}

<HeaderWithCloseButton
    title= {this.props.isProfilePicture ? this.props.displayName : 
        this.props.isUploadingAttachment
            ? this.props.translate('reportActionCompose.sendAttachment')
            : this.props.translate('common.attachment')
    }

For high quality image, we also have to add imageUrl in src/libs/actions/PersonalDetails.js formatPersonalDetails function.

function formatPersonalDetails(personalDetailsList) {
    Timing.start(CONST.TIMING.PERSONAL_DETAILS_FORMATTED);
    const formattedResult = {};

    // This method needs to be SUPER PERFORMANT because it can be called with a massive list of logins depending on the policies that someone belongs to
    // eslint-disable-next-line rulesdir/prefer-underscore-method
    Object.keys(personalDetailsList).forEach((login) => {
        const personalDetailsResponse = personalDetailsList[login];

        // Form the details into something that has all the data in an easy to use format.
        const avatar = getAvatar(personalDetailsResponse, login);
        const displayName = getDisplayName(login, personalDetailsResponse);
        const pronouns = personalDetailsResponse.pronouns || '';
        const timezone = personalDetailsResponse.timeZone || CONST.DEFAULT_TIME_ZONE;
        const firstName = personalDetailsResponse.firstName || '';
        const lastName = personalDetailsResponse.lastName || '';
        const payPalMeAddress = personalDetailsResponse.expensify_payPalMeAddress || '';
        const phoneNumber = personalDetailsResponse.phoneNumber || '';
+        const imageUrl = personalDetailsResponse.avatar || OptionsListUtils.getDefaultAvatar(login);;
        formattedResult[login] = {
            login,
            avatar,
            displayName,
            firstName,
            lastName,
            pronouns,
            timezone,
            payPalMeAddress,
            phoneNumber,
+            imageUrl
        };
    });
    Timing.end(CONST.TIMING.PERSONAL_DETAILS_FORMATTED);
    return formattedResult;
}

Output:
Screen Shot 2022-03-23 at 17 00 15
Screen Shot 2022-03-23 at 16 59 58

@parasharrajat
Copy link
Member

Bump @Expensify/design #8197 (comment)

@dylanexpensify
Copy link
Contributor

I'm heading on parental leave so reassigning! Thank you to whoever gets assigned this! ❤️

@dylanexpensify dylanexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels May 6, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 6, 2022

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 6, 2022
@dylanexpensify dylanexpensify added Weekly KSv2 and removed Daily KSv2 labels May 6, 2022
@kadiealexander
Copy link
Contributor

@sobitneupane as per Dylan's message above, please let us know the latest update when you can. :)

@sobitneupane
Copy link
Contributor

@sobitneupane as per Dylan's message above, please let us know the latest update when you can. :)

Deployed to staging. Awaiting PROD deployment

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 13, 2022
@melvin-bot melvin-bot bot changed the title Feature Request: Add the ability to view profile pictures in full screen/larger size by clicking/tapping on them [HOLD for payment 2022-05-20] Feature Request: Add the ability to view profile pictures in full screen/larger size by clicking/tapping on them May 13, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 13, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.57-17 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 2022-05-20. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 19, 2022
@kadiealexander
Copy link
Contributor

https://www.upwork.com/ab/applicants/1527517318879318016/job-details
https://www.upwork.com/jobs/~01b845f7502650aa01

Sorry @sobitneupane and @parasharrajat I had no idea the Upwork post had closed. Please apply here so I can pay you both!

@sobitneupane
Copy link
Contributor

sobitneupane commented May 20, 2022

https://www.upwork.com/ab/applicants/1527517318879318016/job-details https://www.upwork.com/jobs/~01b845f7502650aa01

Sorry @sobitneupane and @parasharrajat I had no idea the Upwork post had closed. Please apply here so I can pay you both!

@kadiealexander Applied.

@kadiealexander
Copy link
Contributor

Offer sent, please accept!

@kadiealexander
Copy link
Contributor

@sobitneupane has been paid! Thanks for your work on this. :)

@sobitneupane
Copy link
Contributor

@sobitneupane has been paid!

Thank you.

Thanks for your work on this. :)

My pleasure.

@parasharrajat
Copy link
Member

@kadiealexander Applied

@sudharsanvishnu
Copy link

@kadiealexander
Copy link
Contributor

@parasharrajat contract sent!

@kadiealexander
Copy link
Contributor

Everyone is paid!! Thanks team :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Design Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests