App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-06] Room details - Room avatar is square instead of circle

Open isagoico opened this issue 5 years ago • 15 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Navigate to a room (e.g #announcements)
  2. Tap on the header to access room details

Expected Result:

Avatar image should be a circle

Actual Result:

Avatar image is squared

Workaround:

None needed, visual issue.

Platform:

Where is this issue occurring?

  • iOS
  • Android

Version Number: 1.1.14-0

Reproducible in staging?: Yes Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:

Issue reported by: @shawnborton Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1636726932159700

View all open jobs on GitHub

isagoico avatar Nov 12 '21 20:11 isagoico

Triggered auto assignment to @tylerkaraszewski (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Nov 12 '21 20:11 MelvinBot

Android has circled image.

parasharrajat avatar Nov 12 '21 21:11 parasharrajat

Seems like a straightforward contributor issue, I'll tag as such and let someone propose a solution.

tylerkaraszewski avatar Nov 15 '21 13:11 tylerkaraszewski

Triggered auto assignment to @bfitzexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Nov 15 '21 13:11 MelvinBot

Upwork posting.

bfitzexpensify avatar Nov 15 '21 13:11 bfitzexpensify

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

MelvinBot avatar Nov 15 '21 13:11 MelvinBot

@isagoico Could you please confirm if this is reproducible on any platform? my testing revealed that it looks good on the latest code.

parasharrajat avatar Nov 15 '21 16:11 parasharrajat

Proposed Solution

This is reproducible in version: 1.1.14-4 for iOS 15.0

https://user-images.githubusercontent.com/7823358/141819040-4c1cf745-64ac-429e-b14a-a2f339022e5b.mov

We need to change style at line 134, 135, and 152 within ReportDetailsPage.js file. https://github.com/Expensify/App/blob/6701446b6dd7d77049fd399dcf6a042e6d05cae1/src/pages/ReportDetailsPage.js#L131-L137

https://github.com/Expensify/App/blob/6701446b6dd7d77049fd399dcf6a042e6d05cae1/src/pages/ReportDetailsPage.js#L147-L157

**Solution: ** Update style as shown under.

 <Avatar
    isDefaultChatRoom={isDefaultRoom(this.props.report)}
    isArchivedRoom={isArchivedRoom(this.props.report)}
    containerStyles={[styles.avatarLarge, styles.mb4]}    //  *** Updated code here
    imageStyles={[styles.avatarLarge]}                   //  *** Updated code here
    source={{uri: this.props.report.icons[0]}}
/>

 <Text
    style={[
        styles.sidebarLinkText,
        styles.optionAlternateText,
        styles.textLabelSupporting,
        styles.mb4,    //  *** Updated code here
    ]}
    numberOfLines={1}
>
    {defaultRoomSubtitle}
</Text>

Screen record after update

iOS

https://user-images.githubusercontent.com/7823358/141819284-07702cfb-c941-4eca-8b10-612d53f02f71.mov

Android

https://user-images.githubusercontent.com/7823358/141819368-d87310c4-b11e-4142-8e85-d858e50990ac.mov

Mobile Web

https://user-images.githubusercontent.com/7823358/141819440-1484fa8c-9a81-4af4-874a-599ec27752da.mov

PrashantMangukiya avatar Nov 15 '21 16:11 PrashantMangukiya

I am in confusion @PrashantMangukiya What exactly did you change here?

parasharrajat avatar Nov 15 '21 16:11 parasharrajat

Changed style from this

 containerStyles={[styles.singleAvatarLarge, styles.mb4]} 
 imageStyles={[styles.singleAvatarLarge]} 

to this

containerStyles={[styles.avatarLarge, styles.mb4]}    //  *** Updated
imageStyles={[styles.avatarLarge]}                   //  *** Updated

PrashantMangukiya avatar Nov 15 '21 16:11 PrashantMangukiya

I was able to reproduce this issue in v1.1.14-0, iOS 15.0.

Here is screenshots. https://imgur.com/a/as4osIF https://imgur.com/a/hGmUA4s

The problem is that borderRadius property is set but overflow property is not set for the image container.

The solution is, we need to add the style at line 1323 in src/styles/styles.js

singleAvatarLarge: {
      height: 64,
      width: 64,
      backgroundColor: themeColors.icon,
      borderRadius: 64,
+     overflow: 'hidden', // add this line
  },

We need to add overflow: 'hidden'

wenge8n avatar Nov 15 '21 17:11 wenge8n

While both proposals seem to fix the issue, I think @wenge8n has the simpler solution. @bfitzexpensify let's hire @wenge8n for this one. @wenge8n once you get the invite feel free to start on a PR!

Jag96 avatar Nov 16 '21 20:11 Jag96

@wenge8n offer sent!

Jag96 avatar Nov 16 '21 20:11 Jag96

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.16-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/6348

If no regressions arise, payment will be issued on 2021-12-06. :confetti_ball:

botify avatar Nov 29 '21 18:11 botify

Paid and contract ended.

bfitzexpensify avatar Dec 06 '21 13:12 bfitzexpensify