microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

[BUG] Incorrect Presence Display

Open dougroutledge opened this issue 1 year ago • 3 comments

The avatar icon with presence displays green when the presence is "Available Idle" and "Inactive" where MS Teams and the other MS apps display the yellow away icon. It corrects once the presence changes to Away, but this should be correct to match the product line.

dougroutledge avatar Oct 18 '24 17:10 dougroutledge

@dougroutledge thank you for raising this issue. I wanted to clarify on reproducing this issue:

  1. The mgt-person component with presence "Available Idle" and "Inactive" is green. This should be yellow away icon. image
  2. The mgt-person component with presence "Away" is yellow. image

So the second one is the correct icon to use for "Available Idle" and "Inactive" presence?

I also want to draw your attention to this doc https://learn.microsoft.com/en-us/microsoftteams/presence-admins#presence-states-in-teams that we used to create the rendering options based on availability(statuses) and activity. From it we see that the yellow icon is for away (away and away last seen time activities) and be right back statuses.

For your case, the availability is 'AvailableIdle' and the activity is unknown, which defaults to the green icon: image

For "Inactive", it should be like this as this is an unknown status in mgt (and also in the teams presence list) and will display like this: image

For "Away" the display is correct because the activities we check for are "out of office" or "away last seen time". The "away last seen time" and unknown activities (in this example "Inactive") default to the yellow icon: image

I'm not sure of the combination of availability status and activity that is causing this mismatch for you. If you can provide more information on this, we can be able to pinpoint the appropriate way to create the correct icon.

Here is the functionality that is used to render the icon in the mgt-person component

https://github.com/microsoftgraph/microsoft-graph-toolkit/blob/e2edc883103c50a99b5acfc8d2f7d8f44028adf3/packages/mgt-components/src/components/mgt-person/mgt-person.ts#L771-L877

musale avatar Oct 22 '24 10:10 musale

The issue is with this combination, Teams is yellow, and MGT is green. So it is not consistent. image

dougroutledge avatar Oct 22 '24 13:10 dougroutledge

AvailableIdle is not an "unknown" availability, it is defined the MS graph presence object. (Above)

image

dougroutledge avatar Oct 22 '24 13:10 dougroutledge