Fix custom workspace avatar border radius is different#24088
Conversation
|
@thesahindia 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] |
|
Solved. Screenshots added! |
| : [StyleUtils.getAvatarStyle(props.size), StyleUtils.getAvatarBorderStyle(props.size, props.type)]; | ||
| ? [StyleUtils.getAvatarStyle(props.size), ...props.imageStyles, styles.noBorderRadius] | ||
| : [StyleUtils.getAvatarStyle(props.size), styles.noBorderRadius]; | ||
|
|
There was a problem hiding this comment.
Explanation of the problem:
In our previous PR, we are removing multiple border radius that is applied on both parent and child view. However, we forget to cover the case where the workspace avatar is a custom image because it is rendered differently.
Lines 91 to 114 in 2f750ad
So, in this PR, I removed the border radius from the image style.
The reason StyleUtils.getAvatarBorderStyle(props.size, props.type) is added is because StyleUtils.getAvatarStyle(props.size) set the border-radius value to be the same as the width and height of the avatar. This makes the avatar will always completely rounded, which is wrong for workspace avatar.
There was a problem hiding this comment.
Actually, I found that we have a previous commit that is trying to remove the redundant border-radius, but because there are lot of changes to the avatar, the redundant border-radius happen again.
Reviewer Checklist
Screenshots/VideosAndroid |
thesahindia
left a comment
There was a problem hiding this comment.
I couldn't build the app on android. Approving it as it tested well on other platforms and @bernhardoj has already attached the screenshot for android.
|
@thesahindia thanks for the review. Btw, can we treat this as not a regression? This border issue exists on both default and custom workspace avatars, but in our previous PR, we only handle the default workspace avatar case by fixing the redundant border-radius and removing the background color workaround. Removing the background color workaround is the reason we can see the gap as shown below. cc: @danieldoglas |
|
@bernhardoj I won't treat this one as a regression because it was not caused by your previous PR, but I'll consider that both should have been fixed in the previous PR so the bounty will stay the same. Is that OK for you? |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@danieldoglas yes, that's totally fine. Thanks! |
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 1.3.54-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 1.3.54-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.54-13 🚀
|


























Details
This is a regression of #23707 where we want to fix the workspace icon border radius. However, we forget to test the case when the workspace avatar is a custom image.
Fixed Issues
$ #24069
$ #23426
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite:
a. have more than 4 workspaces
b. the 4th workspace avatar should be a custom image
c. one of the 1st to 3rd workspace avatars should be a custom image
You can zoom in to notice it easier
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android