-
Notifications
You must be signed in to change notification settings - Fork 3k
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 Group Chat Avatar Offline Feedback in Chat #42088
Conversation
Hi @s77rt, There are a few things I wanted to confirm:
2. We don't need to show error message for avatar in report header and LHN right ? 3. Do we need to implement offline feedback for avatar in tooltip ? Here: |
Also, I will complete the checklist once PR is complete. |
For 1 and 2: The error should show only on the place where we can edit the avatar. |
Taking a look into this now. I think changing the errorRowStyles passed to AvatarWithImagePicker should fix this problem. |
@s77rt I just checked out main and it seems that the workspace error is already broken there: |
The error is an array, you probably types a string, try with |
Thanks for catching that. The error message is fixed now at every place. |
<DefaultAvatar /> | ||
)} | ||
</View> | ||
<OfflineWithFeedback pendingAction={pendingAction}> |
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.
Why do we have two OfflineWithFeedback?
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 only want to apply pendingAction to avatar. But if we apply error in the second OfflineWithFeedback then it messes with the overall styles of error message. That's why I removed pendingAction from the first OfflineWithFeedback and it will only responsible to show errors if any. If we only apply OfflineWithFeedback to avatar only then we need to change the style of error message and I tried different padding and margins also but it was not working. The error message overlaps with the title and description as well here.
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.
Having two OfflineWithFeedback
for the same underlaying component feels like a workaround. Can you get ride of one of them and try to fix the error message? (try use styles.w100 if it helps)
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.
Hi @s77rt, I have tried a couple of ways to resolve this issue and some of them worked as well but they broke some other stuff. We will need to refactor the whole AvatarWithImagePicker component to make this work. We are already using multiple OfflineFeedback for error and pending action like in this file:
App/src/components/ReportActionItem/TaskView.tsx
Lines 65 to 71 in d67f0e4
<OfflineWithFeedback | |
shouldShowErrorMessages | |
errors={report.errorFields?.editTask ?? report.errorFields?.createTask} | |
onClose={() => Task.clearTaskErrors(report.reportID)} | |
errorRowStyles={styles.ph5} | |
> | |
<Hoverable> |
And for only pendingAction:
App/src/components/ReportActionItem/TaskView.tsx
Lines 94 to 95 in d67f0e4
<OfflineWithFeedback pendingAction={report.pendingFields?.reportName}> | |
<Text style={styles.taskTitleDescription}>{translate('task.title')}</Text> |
My suggestion is we use 2 OfflineFeedback as we are already using this way in other places in the App. Please let me know if there is any better approach for this ?
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.
@nexarvo Let's not block on that. Can you just remove the extra wrapping View that's inside <OfflineWithFeedback />
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.
Removed extra view in this commit
@nexarvo Everything good here? It's been a week since this comment. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movandroid.2.movAndroid: mWeb ChromeNetworking issue MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@nexarvo Please fix the first test, we don't need to go to the Members page. Also please check #42088 (comment). Once this is resolved please tag me |
@s77rt changes are done. |
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!
🚀 Deployed to staging by https://github.com/marcaaron in version: 1.4.77-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
Details
Fixed Issues
$ #41770
PROPOSAL: #41770 (comment)
Tests
Group Chat Grayed out Case:
Profile Setting Page > Avatar edit is not Grayed out Case:
Workspace Setting Page > Avatar edit is not Grayed out Case:
Group Chat Details Page > Avatar edit is not Grayed out Case:
Offline tests
Same as Tests.
QA Steps
Group Chat Grayed out Case:
Profile Setting Page > Avatar edit is not Grayed out Case:
Workspace Setting Page > Avatar edit is not Grayed out Case:
Group Chat Details Page > Avatar edit is not Grayed out Case:
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
Getting build errors.
iOS: mWeb Safari
Report avatar is grayed out:
Edit Icon in Profile Setting page is not grayed out:
Edit Icon in Workspace Setting page is not grayed out:
MacOS: Chrome / Safari
Screen.20Recording.202024-05-14.20at.2012.mp4
Screen.20Recording.202024-05-14.20at.2012-2.mp4
Screen.20Recording.202024-05-14.20at.2012-3.mp4
MacOS: Desktop