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

BOT Avatar has a blue circle background #2380

Closed
vikramdadwal opened this issue Sep 4, 2019 · 5 comments · Fixed by #2384
Closed

BOT Avatar has a blue circle background #2380

vikramdadwal opened this issue Sep 4, 2019 · 5 comments · Fixed by #2384
Assignees
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.

Comments

@vikramdadwal
Copy link

The avatar image is not taking full background and showing blue circle line around. Not looking good. Though the image is having all white background.

Screenshots

image

Version

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Additional context

[Bug]

@vikramdadwal vikramdadwal added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. Pending customer-reported Required for internal Azure reporting. Do not delete. labels Sep 4, 2019
@tdurnford
Copy link
Contributor

tdurnford commented Sep 4, 2019

The avatar background color is set to the accent color, so I don't think there is a simple way to change the outline color to white without directly modifying the styleSet. Should we consider adding botAvatarBackgroundColor and userAvatarBackgroundColor to the default style options, set their default value to null, and then set the avatar background color to botAvatarBackgroundColor or userAvatarBackgroundColor respectively if the developer provides it; otherwise, set it to the accent color?

Default Style Options

{  
...
  // Avatar
  avatarSize: 40,
+ botAvatarBackgroundColor: null,
  botAvatarImage: '',
  botAvatarInitials: '',
+ userAvatarBackgroundColor: null,
  userAvatarImage: '',
  userAvatarInitials: '',
...
}

Avatar Style Set

export default function createAvatarStyle({ accent, avatarSize, botAvatarBackgroundColor primaryFont, userAvatarBackgroundColor}) {
  return {
    alignItems: 'center',
-   backgroundColor: accent,
    borderRadius: '50%',
    color: 'White',
    display: 'flex',
    fontFamily: primaryFont,
    height: avatarSize,
    justifyContent: 'center',
    overflow: 'hidden',
    position: 'relative',
    width: avatarSize,
+   '&.from-user': {
+     backgroundColor: userAvatarBackgroundColor || accent
+   },
+   '&:not(.from-user)': {
+     backgroundColor: botAvatarBackgroundColor || accent
+   },
    '& > .image': {
      left: 0,
      position: 'absolute',
      top: 0
    }
  };
}

@compulim @corinagum Thoughts?

@corinagum corinagum added Enhancement customer-replied-to Required for internal reporting. Do not delete. and removed bug Indicates an unexpected problem or an unintended behavior. labels Sep 4, 2019
@corinagum
Copy link
Contributor

Seems fine to me. My only hesitation is about the potential conflict with accent, but I figure as long as we document it thoroughly it shouldn't be a problem.

@tdurnford tdurnford self-assigned this Sep 5, 2019
@stevkan
Copy link
Collaborator

stevkan commented Sep 5, 2019

Here is a workaround I have been using. This should suffice until the next release. This demos a blue background in web chat with a black background for the avatars and green/red text overlay (if you are including initials, for example) depending on the user.

let styleSet = createStyleSet({
    backgroundColor: '#19194d',

	botAvatarInitials: 'BB',
    userAvatarInitials: 'NB',
    });
        
styleSet.avatar = {
    ...styleSet.avatar,
    '.from-user': {
        'color': 'Green',
    	'background-color': 'black'
    },
    ':not(from-user)': {
        'color': 'Red',
        'background-color': 'black'
        }
}

@corinagum corinagum added backlog Out of scope for the current iteration but it will be evaluated in a future release. and removed Pending labels Sep 5, 2019
@vikramdadwal
Copy link
Author

@corinagum : When is the next release ?

@corinagum
Copy link
Contributor

Next release is end of October. :)

If you need these changes immediately, please see our documentation on pointing to our MyGet feed for latest bits.

@compulim compulim mentioned this issue Oct 25, 2019
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.
Projects
None yet
4 participants