-
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
Add new Profile page #20144
Add new Profile page #20144
Conversation
@arosiclair Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small requested changes, overall looking good! i haven't tested yet though, waiting for C+ for that :D
@puneetlath If the request fails (like its failing right now because of the missing endpoint), I see an endless spinner. Should we show some sort of error message? |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-06-08.at.4.22.44.PM.movMobile Web - ChromeScreen.Recording.2023-06-08.at.4.27.50.PM.movMobile Web - SafariScreen.Recording.2023-06-08.at.4.28.28.PM.movDesktopScreen.Recording.2023-06-08.at.4.25.48.PM.moviOSScreen.Recording.2023-06-08.at.4.32.51.PM.movAndroidScreen.Recording.2023-06-08.at.4.31.41.PM.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@allroundexperts please test again when you get a chance. If you don't find any issues other than the group chat thing, then I think we're ok. Thanks! |
On it now! |
</CommunicationsLink> | ||
</View> | ||
) : null} | ||
{pronouns ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: {Boolean(pronouns) &&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint is saying it's redundant for this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks for filing those bugs @allroundexperts! |
Nice work team! 💪 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/Beamanator in version: 1.3.26-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.26-4 🚀
|
@@ -97,7 +98,7 @@ const ReportWelcomeText = (props) => { | |||
<Tooltip text={tooltip}> | |||
<Text | |||
style={[styles.textStrong]} | |||
onPress={() => Navigation.navigate(ROUTES.getDetailsRoute(participants[index]))} | |||
onPress={() => Navigation.navigate(ROUTES.getProfileRoute(participantAccountIDs[index]))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was overlooked. participantAccountIDs
order was different from participants
and it caused regression - Web - New Group - Wrong user details page opens on clicking at display names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#20583 (comment) for more details about the root cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, that makes total sense. Should've considered that. Thanks for the feedback!
While adding |
Good catch. Thanks for linking! |
@@ -114,10 +114,12 @@ export default { | |||
SET_PASSWORD_WITH_VALIDATE_CODE: 'setpassword/:accountID/:validateCode', | |||
DETAILS: 'details', | |||
getDetailsRoute: (login) => `details?login=${encodeURIComponent(login)}`, | |||
PROFILE: 'a/:accountID', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Just a heads-up that this has caused a regression in #21969
Deep linking wasn't working for the new PROFILE route.
When adding a new route we should also add it to App/well-known
/apple-app-site-association for iOS
{ "/": "/a/*", "comment": "Profile Page" }
And to AndroidManifest.xml for Android
<data android:scheme="https" android:host="new.expensify.com" android:pathPrefix="/a"/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow. I had no idea. Can we make that obvious somehow? Like with a checklist item or lint rule or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@puneetlath, I proposed to add a checklist item in https://expensify.slack.com/archives/C049HHMV9SM/p1690395182200269
Looks like we should add it, I'll do that tomorrow (not sure what the process is just yet, will find it)
const phoneNumber = getPhoneNumber(details); | ||
const phoneOrEmail = isSMSLogin ? getPhoneNumber(details) : login; | ||
|
||
const isCurrentUser = _.keys(props.loginList).includes(login); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have used the account ID to check if is current user because:
- Users are now identified by account ids
- The account ID is available from the route where the login is from onyx. Using data from onyx results in a delay where the first render will always evaluate
isCurrentUser
as false and causing this bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch, thanks for letting me know!
const optimisticData = [ | ||
{ | ||
onyxMethod: Onyx.METHOD.MERGE, | ||
key: ONYXKEYS.PERSONAL_DETAILS_LIST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding isLoading
to PERSONAL_DETAILS_LIST
changes personalDetailsList
. Lots of components subscribe to this and rerender causing a performance issue. #37986
Details
This PR adds a new ProfilePage which is based on accountID to replace the current DetailsPage. However, we aren't removing the DetailsPage yet since it is still needed for mentions.
Fixed Issues
#20070
Tests
Offline tests
The profile should be accessible when online of someone you know. Going to the profile via URL of someone you don't know while offline should just show a loading spinner.
QA Steps
Same as test steps.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android