OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
430 stars 199 forks source link

Deep link state is not cleared on refresh in new Teams app #2128

Open justim opened 9 months ago

justim commented 9 months ago

A deep link for our app to a personal tab has strange behavior after the page is loaded.

Deep link: https://teams.microsoft.com/l/entity/<appId>/<entityId>?context={"subEntityId":"<subEntityId>"}

Opening the deep link for the first time works as expected, the value from subEntityId is found in context.page.subPageId and can be used to navigate to the right location in our app.

From there it is not possible leave the deep link, except from our own navigation on the page:

In both case the deep link state is not cleared and the reload from the previous lists opens the deep link again. Because the page is reloaded it is not possible to set a global variable on the page to track if the deep link is followed. Putting it in localStorage or sessionStorage also doesn't work, pressing the deep link again should open it again.

There does not seem to be a way to clear the deep link state manually in the Teams SDK.

Environment:

This does not happen in de web version and the old Teams app, the tab label does not nothing (as expected) and the reload just opens the contentUrl.

Is there any way to solve this from our end, or is this a limitation of the new Teams app?

ChetanSharma-msft commented 9 months ago

Hello @justim - Thanks for raising your query. We will look into it and let you know the updates.

Dinesh-MSFT commented 9 months ago

Hi @justim Could please share the repro video of both Teams desktop and web client (new teams) differentiating the behavior.

justim commented 9 months ago

Hi, I created a video with a reproduction. First is opening the deeplink with the old Teams app, clicking on the "Learnings" tab and the refresh button; the expected things happen. Then the app is switched to the new version and the same interactions are done, this time the weird behavior is happening.

https://github.com/OfficeDev/microsoft-teams-library-js/assets/757292/6ec9ba92-4773-462c-bb1b-26df048e0180

The web version shows the same behavior as the old Teams app.

Dinesh-MSFT commented 9 months ago

Hi @justim We have raised the bug. we will keep you posted on the updates.

Kulakshi commented 8 months ago

This remains when navigated trough tabs too. I use a deep link to navigate from tab A to B. But the context it not cleared when I try to navigate to B by clicking on tab bar.

Dinesh-MSFT commented 8 months ago

Hi @Kulakshi - We will check this and get back to you.

tanimcseku commented 8 months ago

Hi all, does anyone know any ETA for the fix of that issue?

ChetanSharma-msft commented 6 months ago

Hello Everyone, This bug is fixed. Kindly test and let us know if you are still facing this issue.

justim commented 6 months ago

Thanks for the fix, works fine! 👍

ChetanSharma-msft commented 6 months ago

Hello @justim - Could you please share your valuable feedback via Microsoft Teams Developer Community Response Feedback link?

NarenderSingh commented 5 months ago

Hi @justim. Could you please let us know, which MS Teams versions and @microsoft/teams-js library have you used to cross check it? Is it the same version as mentioned above in your initial question?

justim commented 5 months ago

The latest version of Teams at the time of writing, both the browser version and the desktop version. The version of @microsoft/teams-js did not change (2.19.0)

Teams desktop version: Version 24046.2813.2770.1094 (24046.2813.2770.1094)

NarenderSingh commented 5 months ago

Hi @justim. Thanks for confirming!

tanimcseku commented 3 months ago

Hi @justim , by any chance have you encountered the issue again? i.e. deep link state not clearing. I am suddenly facing the issue again for one of my tab app so want to confirm from you as you reported this first and and I believe you using this feature frequently.

justim commented 3 months ago

For me the issue also reappeared; almost the same as the video reproduction from a previous comment.

Steps:

Steps to clear the deep link state:

tanimcseku commented 3 months ago

Thanks for the update and reponing the ticket @justim

tanimcseku commented 3 months ago

Hi @Wajeed-msft , any update on this please?

vedatkokmen commented 2 months ago

Any updates on this @Wajeed-msft ?

bitobrian commented 1 month ago

Bumping for update. This still persists in a tab app using latest and new Teams..

ChetanSharma-msft commented 1 month ago

Hello @justim & all, Sorry for delay in response.

This issue is fixed internally & tested but currently we do not have exact ETA to share with you for public release. We are actively checking the status and let you know once it is publicly rolled out.