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

fix: No results found issue and refactor & merge NewGroupPage into NewChatPage #5138

Merged
merged 16 commits into from
Oct 20, 2021

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented Sep 8, 2021

Details

#4993 (comment)

Fixed Issues

$ #4993

Tests | QA Steps

No result found case

  1. Go to staging.new.expensify.com
  2. Login with any account.
  3. Tap + green fab and select "New chat" option
  4. On the search box, search any user you have access.
  5. You should not see No result found if a user is found.

New Chat Page functionality

  1. Test the New Chat Page is functioning correctly as it should.

New Group Page functionality

  1. Test the New Group Page is functioning correctly as it should.

Split Bill participants selection functionality

  1. Test the Split Bill participants selection is functioning correctly as it should.

Request Money participants selection functionality

  1. Test the Request Money participants selection is functioning correctly as it should.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web | Desktop

image

Mobile Web

Screenshot 2021-09-27 04:19:47

iOS

Android

Screenshot 2021-09-27 04:18:55

@parasharrajat parasharrajat requested a review from a team as a code owner September 8, 2021 18:04
@MelvinBot MelvinBot requested review from NikkiWines and removed request for a team September 8, 2021 18:04
@parasharrajat parasharrajat marked this pull request as draft September 8, 2021 18:05
@kadiealexander
Copy link
Contributor

Hi @parasharrajat, I've placed this issue on hold as per this update, as we are prioritising issues related to a feature release scheduled for 9/24. As an apology for the delay, we will add a $100 bonus as a thank you for waiting.

@parasharrajat parasharrajat changed the title [WIP] fix: No results found message displayed even when results are found fix: No results found issue and refactor & merge NewGroupPage into NewChatPage Sep 23, 2021
@parasharrajat parasharrajat marked this pull request as ready for review September 23, 2021 22:52
@NikkiWines
Copy link
Contributor

@parasharrajat, just letting you know that this is on my radar, I'm just holding on my review of this until the N6-hold no longer applies

@parasharrajat
Copy link
Member Author

Thanks, @NikkiWines. I will probably ask @roryabraham to confirm the changes here as he requested refactoring.

@NikkiWines NikkiWines changed the title fix: No results found issue and refactor & merge NewGroupPage into NewChatPage [HOLD] fix: No results found issue and refactor & merge NewGroupPage into NewChatPage Oct 11, 2021
@NikkiWines
Copy link
Contributor

Adding [HOLD] to the title of this per https://expensify.slack.com/archives/C01GTK53T8Q/p1633978544125600

@NikkiWines
Copy link
Contributor

N6-Hold is now over. @parasharrajat please merge master and re-test this PR, thank you! 🙇

@NikkiWines NikkiWines changed the title [HOLD] fix: No results found issue and refactor & merge NewGroupPage into NewChatPage fix: No results found issue and refactor & merge NewGroupPage into NewChatPage Oct 18, 2021
@parasharrajat
Copy link
Member Author

parasharrajat commented Oct 18, 2021

@NikkiWines I have updated the code and tested it.

cc: @roryabraham I have refactored the NewGroupPage in the NewChatPage.

NikkiWines
NikkiWines previously approved these changes Oct 18, 2021
Copy link
Contributor

@NikkiWines NikkiWines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but I would recommend adding some QA steps for testing creating a new chat and a new group chat just to make sure everything is being thoroughly tested.

@parasharrajat
Copy link
Member Author

What a mess another conflict... For QA steps: I have added that those pages should be retested completely. There are no special steps. just the complete functionality for mentioned pages.

NikkiWines
NikkiWines previously approved these changes Oct 18, 2021
@parasharrajat
Copy link
Member Author

parasharrajat commented Oct 18, 2021

Check passed Ready to roll. @NikkiWines

NikkiWines
NikkiWines previously approved these changes Oct 18, 2021
Copy link
Contributor

@NikkiWines NikkiWines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍 all yours @roryabraham

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @parasharrajat! Just had a few minor comments and also there's conflicts again. Sorry for the delayed review here.

src/pages/NewChatPage.js Outdated Show resolved Hide resolved
src/pages/NewChatPage.js Outdated Show resolved Hide resolved
src/pages/NewChatPage.js Show resolved Hide resolved
src/pages/NewChatPage.js Outdated Show resolved Hide resolved
src/pages/NewChatPage.js Outdated Show resolved Hide resolved
@parasharrajat
Copy link
Member Author

@roryabraham @NikkiWines Changes done.

@roryabraham
Copy link
Contributor

Looks like we've got a lint error.

@parasharrajat
Copy link
Member Author

Sorry Just fixed that.

@parasharrajat
Copy link
Member Author

@roryabraham Ready to merge.

Copy link
Contributor

@NikkiWines NikkiWines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@parasharrajat
Copy link
Member Author

@roryabraham Gentle Bump.

@roryabraham roryabraham merged commit 7f3153a into Expensify:main Oct 20, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @roryabraham in version: 1.1.8-10 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@marcaaron
Copy link
Contributor

Hey this is a nice cleanup!

Just wanted to drop some feedback that maybe we could avoid creating components that switch from one "type" to another depending on a single prop. This practice feels wrong to me and I wanted to suggest we break that up into a few more props...

this.props.isGroupChat ? this.excludedGroupEmails : [],
This could be changed to an excludedLogins prop that defaults to an empty array

if (this.props.isGroupChat) {
sections.push({
title: undefined,
data: this.state.selectedOptions,
shouldShow: true,
indexOffset: 0,
});
if (maxParticipantsReached) {
return sections;
}
}
This could be canSelectMultipleOptions

if (this.props.isGroupChat) {
return this.toggleOption(option);
}
Also canSelectMultipleOptions

title={this.props.isGroupChat
? this.props.translate('sidebarScreen.newGroup')
: this.props.translate('sidebarScreen.newChat')}
title

{this.props.isGroupChat && lodashGet(this.state, 'selectedOptions', []).length > 0 && (
<FixedFooter>
<Button
success
onPress={this.createGroup}
style={[styles.w100]}
text={this.props.translate('newChatPage.createGroup')}
/>
</FixedFooter>
)}
</>
canSelectMultipleOptions

This way the page has no knowledge of whether it is a "group" page just which behavior it needs to do. I hope this makes sense :)

@parasharrajat
Copy link
Member Author

Yup @marcaaron these are great suggestions. At that time I just thought of merging two pages into one. But yeah this is a good mindset to have for future.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.10-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants