SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.23k stars 992 forks source link

SPFx ACE : Value of "this.context.deviceContext" incorrect in Teams desktop #7732

Closed anoopt closed 1 year ago

anoopt commented 2 years ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Developer environment

Linux

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

While developing ACEs, we can get to know the device context using this.context.deviceContext.

The value of that should one of WebView, Mobile or TeamsDesktop based on where we access the ACE from.

This property gives the correct output when in browser (WebView) or in Teams mobile app (Mobile).

However, in Teams desktop app the value is WebView whereas, it should be TeamsDesktop.

image

Steps to reproduce

  1. Create an ACE using SPFx
  2. In the onInit method alert the property this.context.deviceContext
  3. Open the ACE in Teams desktop app

Expected behavior

In Teams desktop app the value of this.context.deviceContext should be TeamsDesktop.

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

lucabandMSFT commented 2 years ago

@anoopt , sorry for our delay in answering. We indeed had some issues in our code that was reporting incorrect information but that should now have been fixed. Can you please check and see if the issue still exists?

anoopt commented 2 years ago

Thank you @lucabandMSFT - Tested this with SPFx 1.15.0-beta.1, the value is correct on the initial load however if you navigate to a different area in Teams and open the Viva connections app, the value shows as WebView again.

2022-03-18_18-58-56

lucabandMSFT commented 1 year ago

Thanks you @anoopt , looking on the issue now. Also, one question. The "Viva Connections" app you are using is the one that comes out of the box from Teams app, right? it is not this one: https://docs.microsoft.com/en-us/sharepoint/viva-connections-desktop

AJIXuMuK commented 1 year ago

@anoopt - could you please reply to the Luca's question? Thanks!

anoopt commented 1 year ago

Sorry for the delayed response yes, I am using the "Viva Connections" that comes out of the box from Teams app.

lucabandMSFT commented 1 year ago

@anoopt, thanks. And, to be clear, the issue is happening right now as well? Can you please confirm it?

anoopt commented 1 year ago

Sure @lucabandMSFT will test with the latest SPFx version and let you know.

AJIXuMuK commented 1 year ago

@anoopt - were you able to check if the issue is still repro-ed?

anoopt commented 1 year ago

Sorry for the delay in getting back. This can now be closed.

ghost commented 1 year ago

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues