fluentui-apple icon indicating copy to clipboard operation
fluentui-apple copied to clipboard

macOS Avatar backgroundColor algorithm should match iOS

Open Saadnajmi opened this issue 5 years ago • 4 comments

Platform

  • [ ] iOS
  • [ ] macOS

Describe the feature that you would like added

There is a hashing algorithm in Avatar to choose a background color given the primaryText/secondaryText of the avatar. On iOS this was purposefully chosen to match the FluentUI Android implementation. Let's use the same implementation for macOS, which currently uses a slightly different hashing algorithm resulting in different colors.

What component or utility would this be added to

macOS Avatar

Have you discussed this feature with our team, and if so, who

Yes. @markavitale and @harrieshin

Additional context/screenshots

Saadnajmi avatar Jan 12 '21 20:01 Saadnajmi

@kubalani we can close this now?

harrieshin avatar Mar 06 '21 02:03 harrieshin

The algorithms still don't match, so the same Name/Email won't give the same color. That was a followup task

Saadnajmi avatar Mar 06 '21 04:03 Saadnajmi

This is closed now? @kubalani

Saadnajmi avatar Mar 10 '21 06:03 Saadnajmi

The scope of previous PR was only restricted to theme changes, I have updated the initials view algorithm to address this issue specifically.

kubalani avatar Mar 25 '21 04:03 kubalani