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

[HOLD for 0xmiroslav] [$1000] Web - Subscript avatar not showing in workspace chat #21996

Closed
1 of 6 tasks
kbecciv opened this issue Jun 30, 2023 · 61 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff Monthly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jun 30, 2023

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. Login A account with policyExpenseChat beta enabled
  2. Invite B to any workspace that has custom workspace avatar
  3. On A, Go to B's policy expense chat
    (custom workspace avatar (not default avatar) is key to reproduce)

Expected Result:

Workspace avatar should show as subscript

Actual Result:

No subscript avatar

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.34-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

bug.2.mov
Recording.3349.mp4

Expensify/Expensify Issue URL:
Issue reported by: @0xmiroslav
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688056702660869

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0192a425ecc8391c30
  • Upwork Job ID: 1679109827603726336
  • Last Price Increase: 2023-07-12
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@CortneyOfstad
Copy link
Contributor

Heading OoO for the week (back July 10) so re-assigning this in the meantime 👍

@CortneyOfstad CortneyOfstad removed their assignment Jun 30, 2023
@CortneyOfstad CortneyOfstad added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@jeet-dhandha
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

  • Subscript Avatar is not visible when an image is uploaded.

What is the root cause of that problem?

  • Root cause is that the imageStyles property is being passed as null to Avatar component in SubscriptAvatar component.

What changes do you think we should make in order to solve the problem?

  • Passing imageStyles as [styles.avataravatarSmall] property to Avatar component fixes the issue.
Code Changes:
function SubscriptAvatar(props) {
   ...rest code
    return (
        ...rest code
                    <Avatar
                        ...rest params
                    />
        ...rest code
                    <Avatar
-                       imageStyles={null}
+                       imageStyles={[styles.avatarSmall]}
                        ...rest params
                    />
        ...rest code
    );
}

After change:
Screenshot 2023-07-01 at 11 50 17 AM

What alternative solutions did you explore? (Optional)

  • N/A

@c3024
Copy link
Contributor

c3024 commented Jul 1, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Subscript Avatar is not visible if workspace avatar is changed from default.

What is the root cause of that problem?

In web, Image needs size for proper display. This bug appears only in web and not in native.
This is because second Avatar in SubscriptAvatar is passed imageStyle={null} and this null value causes imageStyle to undefined and style undefined passed to the Image with Image getting only source and onError props.

What changes do you think we should make in order to solve the problem?

Since we pass imageStyles: null to Avatar only from SubscriptAvatar and default value of imageStyles in Avatar is [] which is also truthy, we can change imageStyle to this line in Avatar

const imageStyle = props.imageStyles ? [StyleUtils.getAvatarStyle(props.size), ...props.imageStyles, StyleUtils.getAvatarBorderRadius(props.size, props.type)] : [StyleUtils.getAvatarStyle(props.size), StyleUtils.getAvatarBorderRadius(props.size, props.type)];

This gives size for web as well and the image appears and is consistent with the default icon styling as well.

Removing this imageStyle altogether from Avatar or changing it to another style affects the iconStyle property in Avatar and the styling for default icon gets affected with right padding getting smaller. Fixing this needs many more styling changes. So I think the above is the simplest solution.

What alternative solutions did you explore? (Optional)

N/A

@0xmiros
Copy link
Contributor

0xmiros commented Jul 1, 2023

NOTE: this is a follow-up of #20512.
I reported this bug and found solution already while reviewing that PR.
Let me work on this issue, not open for proposals.

@c3024
Copy link
Contributor

c3024 commented Jul 1, 2023

If that is the case since, that PR was not merged, they might as well change this in that PR itself and fix it instead of making another report and working again on it separately.

@0xmiros
Copy link
Contributor

0xmiros commented Jul 1, 2023

@c3024 we already agreed to fix separately. #20512 (comment)

@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

@JmillsExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@JmillsExpensify
Copy link

Slammed with bug reports. I'll close the loop on these today.

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
@Christinadobrzyn
Copy link
Contributor

@0xmiroslav would you be able to confirm if this GH is the same? #22241

@0xmiros
Copy link
Contributor

0xmiros commented Jul 5, 2023

@0xmiroslav would you be able to confirm if this GH is the same? #22241

yes, exactly same

@melvin-bot
Copy link

melvin-bot bot commented Jul 10, 2023

@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?

@JmillsExpensify
Copy link

Alright, this one is ready to be triaged!

@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2023
@JmillsExpensify JmillsExpensify added the External Added to denote the issue can be worked on by a contributor label Jul 12, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

@JmillsExpensify, @0xmiroslav Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

@JmillsExpensify, @0xmiroslav 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

@JmillsExpensify, @0xmiroslav 10 days overdue. Is anyone even seeing these? Hello?

@JmillsExpensify
Copy link

Still waiting for payment next steps.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

@JmillsExpensify, @0xmiroslav Huh... This is 4 days overdue. Who can take care of this?

@JmillsExpensify
Copy link

Are we good to pay this one out yet?

@melvin-bot melvin-bot bot removed the Overdue label Sep 7, 2023
@0xmiros
Copy link
Contributor

0xmiros commented Sep 7, 2023

Not yet

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

@JmillsExpensify, @0xmiroslav Huh... This is 4 days overdue. Who can take care of this?

@JmillsExpensify
Copy link

Still holding.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

@JmillsExpensify, @0xmiroslav Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

@JmillsExpensify, @0xmiroslav Still overdue 6 days?! Let's take care of this!

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

@JmillsExpensify, @0xmiroslav Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@JmillsExpensify
Copy link

@0xmiroslav should we still hold for payment?

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@0xmiros
Copy link
Contributor

0xmiros commented Sep 26, 2023

Still hold

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

@JmillsExpensify, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

@JmillsExpensify, @0xmiroslav Still overdue 6 days?! Let's take care of this!

@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

@JmillsExpensify, @0xmiroslav 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

@JmillsExpensify, @0xmiroslav 12 days overdue now... This issue's end is nigh!

@JmillsExpensify
Copy link

Similar to other issues, I'm going to close this issue since I'm overwhelmed with GH assignments. Please reach out to us when you are ready for payment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff Monthly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants