-
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
hide expensify from new chat page #50937
Conversation
@ahmedGaber93 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] |
@Krishna2323 bump for first review. |
@Krishna2323 What is your estimation here? Are you available to finish it today? |
@ahmedGaber93, I'm waiting for @Nodebrute's response on this: |
@Krishna2323 your review still pending and not submitted, you should submit it, follow here step 10 to submit it. Another helpful video. |
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.
@Nodebrute, some minor changes needed.
src/pages/NewChatPage.tsx
Outdated
@@ -38,7 +38,7 @@ type NewChatPageProps = { | |||
isGroupChat?: boolean; |
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.
@Nodebrute, please remove isGroupChat
prop as its been not used anywhere in the component.
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.
@Nodebrute bump
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.
@Krishna2323 I’ve removed all instances where the isGroupChat prop was used.
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.
Thanks, looks good to me 🙌🏻. @ahmedGaber93 we can move forward here.
@ahmedGaber93, really sorry for that, I haven't reviewed a PR before this. |
@Nodebrute could you please update "Tests" with all test cases? |
@@ -229,7 +229,7 @@ function NewChatPage({isGroupChat}: NewChatPageProps) { | |||
|
|||
const itemRightSideComponent = useCallback( | |||
(item: ListItem & OptionsListUtils.Option, isFocused?: boolean) => { | |||
if (!!item.isSelfDM || (item.accountID && CONST.NON_ADDABLE_ACCOUNT_IDS.includes(item.accountID))) { | |||
if (!!item.isSelfDM || (item.login && excludedGroupEmails.includes(item.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.
Can you add more context about using login
instead of accountID
? Is there any comparison between them?
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.
Yes, the excludedGroupEmails contains the logins of all Expensify accounts. That's why I'm using login here. Previously, we were using NON_ADDABLE_ACCOUNT_IDS, which had the account IDs for CHRONOS and NOTIFICATIONS. However, excludedGroupEmails also includes the logins for these two accounts.
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.
More context about using login
instead of accountID
is accountID
can be optimisticAccountID
in userToInvite
util API respond with the full user data
App/src/libs/OptionsListUtils.ts
Lines 1661 to 1664 in 652d2ff
[optimisticAccountID]: { | |
accountID: optimisticAccountID, | |
login: searchValue, | |
}, |
And this can cause this issue
- Login with new account (to confirm there is no local data)
- Click fab > start chat
- Search for
chronos@expensify.com
for the first time
You will see add to group
is displayed temporary, and you can add it to group util API respond with the full user data.
issue.mp4
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.
I think we need to remove NON_ADDABLE_ACCOUNT_IDS
because it is not used in anywhere now
@Nodebrute could you please update "Tests" with all test cases? We need to confirm user is not able to add system emails to groups. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativea.mp4Android: mWeb Chromeaw.mp4iOS: Nativei.mp4iOS: mWeb Safariiw.mp4MacOS: Chrome / Safariweb.mp4MacOS: Desktopd.mp4 |
I will update this in few hours |
Could you help me with the tests? I’m unsure where to add these tests. |
@Nodebrute Sorry, I mean QA Steps not tests in the code. |
Apologies for the mix-up. I’ve updated the tests now. |
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!
@lakchote are we good to merge this? |
Hey @lakchote, just a friendly reminder to merge this when you have a moment. Thanks! |
Sorry @joekaufmanexpensify @Nodebrute I thought I had merged this. It's done now. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
All good. TY! |
🚀 Deployed to staging by https://github.com/lakchote in version: 9.0.59-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.59-3 🚀
|
Details
Fixed Issues
$ #49673
PROPOSAL: #49673 (comment)
Tests
Test 1
Expensify
displayed in contactsTest 2
Offline tests
Same as above
QA Steps
Test 1
Expensify
displayed in contactsTest 2
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop