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

[$250] Need mocks for Edit profile option in personal RHP profile #57809

Open
tpalmerton opened this issue Mar 5, 2025 · 16 comments
Open

[$250] Need mocks for Edit profile option in personal RHP profile #57809

tpalmerton opened this issue Mar 5, 2025 · 16 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@tpalmerton
Copy link

tpalmerton commented Mar 5, 2025

Problem: Customers open their own profile in the RHP (right hand pane) and try to edit their profile, but click around to figure out that’s not a function. Then they get frustrated because they want to update their profile but are unsure how to do so.

Solution: Implement a direct link within the personal profile page in the RHP that routes customers to their profile settings. This will streamline the process, allowing them to easily update their information without additional navigation.

Image

https://expensify.slack.com/archives/C07HPDRELLD/p1741099233250809

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021897151208532805125
  • Upwork Job ID: 1897151208532805125
  • Last Price Increase: 2025-03-05
  • Automatic offers:
    • twilight2294 | Contributor | 106432980
Issue OwnerCurrent Issue Owner: @jayeshmangwani
@dubielzyk-expensify
Copy link
Contributor

Added mock to original post

@dubielzyk-expensify dubielzyk-expensify added Improvement Item broken or needs improvement. Engineering labels Mar 5, 2025
Copy link

melvin-bot bot commented Mar 5, 2025

Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext.

@dubielzyk-expensify dubielzyk-expensify added Weekly KSv2 NewFeature Something to build that is a new item. and removed Daily KSv2 Improvement Item broken or needs improvement. labels Mar 5, 2025
Copy link

melvin-bot bot commented Mar 5, 2025

Triggered auto assignment to @jliexpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Mar 5, 2025

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

Copy link

melvin-bot bot commented Mar 5, 2025

Current assignee @dubielzyk-expensify is eligible for the NewFeature assigner, not assigning anyone new.

@dubielzyk-expensify dubielzyk-expensify added the External Added to denote the issue can be worked on by a contributor label Mar 5, 2025
Copy link

melvin-bot bot commented Mar 5, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021897151208532805125

@melvin-bot melvin-bot bot changed the title Need mocks for Edit profile option in personal RHP profile [$250] Need mocks for Edit profile option in personal RHP profile Mar 5, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 5, 2025
Copy link

melvin-bot bot commented Mar 5, 2025

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

@twilight2294
Copy link
Contributor

twilight2294 commented Mar 5, 2025

Proposal

Please re-state the problem that we are trying to solve in this issue.

Add new edit profile button

What is the root cause of that problem?

feature request

What changes do you think we should make in order to solve the problem?

We need to introduce a new menuItem and route to profile page if the page is a self dm profile here here

{isCurrentUser && (
    <MenuItem
        shouldShowRightIcon
        title={'Edit your Profile'} // This wil be trasnalted in es.ts file as well
        icon={Expensicons.Pencil}
        onPress={() => Navigation.navigate(ROUTES.SETTINGS_PROFILE)}
    />
)}

We can use isSelfDM check as well:

Minor style adjustments will be done during PR phase

Screen.Recording.2025-03-05.at.11.08.04.AM.mov

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A UI bug, but we can write up a UI test which will render the profile screen for self dm and will check to see if we have the option to edit your profile

What alternative solutions did you explore? (Optional)

@nkdengineer
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Add Edit profile option in personal RHP profile

What is the root cause of that problem?

New feature

What changes do you think we should make in order to solve the problem?

Test branch: https://github.com/nkdengineer/App/tree/fix/57809

  1. Add the Edit profile row here, we also need to add the translation for Edit your Profile
{isCurrentUser && (
    <MenuItem
        shouldShowRightIcon
        title={'Edit your Profile'}
        icon={Expensicons.Pencil}
        onPress={() => Navigation.navigate(ROUTES.SETTINGS_PROFILE.getRoute(Navigation.getActiveRoute()))}
    />
)}

  1. We need to add backTo parameter to the profile setting page. Then, we can use this to go back to the profile RHP when clicking on the back button in the settings on the profile page on the small screen.
SETTINGS_PROFILE: {
    route: 'settings/profile',
    getRoute: (backTo?: string) => getUrlWithBackToParam('settings/profile', backTo),
},

SETTINGS_PROFILE: 'settings/profile',

const route = useRoute<PlatformStackRouteProp<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.ROOT>>();
onBackButtonPress={() => Navigation.goBack(route.params?.backTo)}

onBackButtonPress={() => Navigation.goBack()}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

This is the new UI, I think we don't need to test it. If we want to add a test, we can render ProfilePage with the accountID param is the current user accountID and verify that the Edit your profile route appears.

What alternative solutions did you explore? (Optional)

NA

Result

Screen.Recording.2025-03-05.at.13.43.26.mov

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@twilight2294
Copy link
Contributor

Note

note to C+ reviewer that the navigation would had been easily done during the PR phase and my proposal fixes the original feature request, so please consider that during PR review. as the other contributors proposal is just an extension of my proposal

@jayeshmangwani
Copy link
Contributor

Thanks for the proposals, @twilight2294 and @nkdengineer!

This is a new feature, and the implementation should be straightforward. @nkdengineer you added additional details for onBackButtonPress, but in my opinion, that could have been handled during PR testing. So, I think we can proceed with @twilight2294's Proposal. Thanks! 🙏

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Mar 5, 2025

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

@twilight2294
Copy link
Contributor

bump for assignment @yuwenmemon

@jayeshmangwani
Copy link
Contributor

@yuwenmemon, whenever you get a chance, please review this comment for the selected proposal. Thanks! 🙏

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 8, 2025
Copy link

melvin-bot bot commented Mar 8, 2025

📣 @twilight2294 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer 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 Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Mar 8, 2025
@twilight2294
Copy link
Contributor

PR ready for review @jayeshmangwani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

7 participants