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

Updates to caching article for app.lifecycle APIs #12565

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JoshuaPartlow
Copy link
Contributor

Updates article to reflect changes API changes for app caching.

Article is being staged to fascilitate technical review, do not merge.

@acrolinxatmsft1
Copy link
Collaborator

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/tabs/how-to/app-caching.md 82 43 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Copy link
Contributor

Learn Build status updates of commit 98ed438:

⚠️ Validation status: warnings

File Status Preview URL Details
msteams-platform/tabs/how-to/app-caching.md ⚠️Warning View Details
msteams-platform/assets/images/saas-offer/cached-launch-app.png ✅Succeeded n/a (file deleted or renamed)
msteams-platform/assets/images/saas-offer/first-launch-app.png ✅Succeeded n/a (file deleted or renamed)
msteams-platform/assets/images/tabs/first-launch-app.png ✅Succeeded View
msteams-platform/assets/images/tabs/suspended-launch-app.png ✅Succeeded View

msteams-platform/tabs/how-to/app-caching.md

  • Line 138, Column 4: [Warning: bookmark-not-found - See documentation] Cannot find bookmark '#enable-app-caching' in 'tabs/how-to/app-caching.md'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@acrolinxatmsft1
Copy link
Collaborator

Acrolinx Scorecards

We currently enforce a minimum score of 80.

Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article Score Issues Scorecard Processed
msteams-platform/tabs/how-to/app-caching.md 82 43 link

More info about Acrolinx

Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Copy link
Contributor

Learn Build status updates of commit c648891:

✅ Validation status: passed

File Status Preview URL Details
msteams-platform/assets/images/saas-offer/cached-launch-app.png ✅Succeeded n/a (file deleted or renamed)
msteams-platform/assets/images/saas-offer/first-launch-app.png ✅Succeeded n/a (file deleted or renamed)
msteams-platform/assets/images/tabs/first-launch-app.png ✅Succeeded View
msteams-platform/assets/images/tabs/suspended-launch-app.png ✅Succeeded View
msteams-platform/tabs/how-to/app-caching.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:


The following are the limitations for app suspension within the Teams app:

* The Teams client invokes the `resume` handler only after the `suspendOrTerminate` sequence of the app is completed. For example, if a user launches tab A of your app and then launches tab B of the same app, tab B won't get the `resume` signal until the `suspendOrTerminate` handler on tab A is done executing.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is general limitation


* The Teams client invokes the `resume` handler only after the `suspendOrTerminate` sequence of the app is completed. For example, if a user launches tab A of your app and then launches tab B of the same app, tab B won't get the `resume` signal until the `suspendOrTerminate` handler on tab A is done executing.

* Apps are cached on a per-window basis. App caching happens on a per app (not on a per tab) basis within the same window.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is general limitation


* Follow the guidelines in this section to onboard your app to app caching in Teams meeting. For app caching support only in meetings, register the `load` or `beforeUnload` handlers if the context is `sidePanel`.
* App suspension isn't supported for the meeting stage or dialog (referred as task module in TeamsJS v1.x) contexts, because these can be opened on top of the tab and the same iframe or webview can't be used to render the content in the tab and the dialog.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table in the beginning of the doc shows what frameContext Teams support for caching.
For non-Teams hubs, only FrameContext.Content will be cached. That means, FrameContext.Task that is inside Dialog in not supported.

* App caching isn't supported for meetings where the invited user count is more than 20.
* If an app fails to load, the app isn't cached.
* If the number of suspended apps exceeds the maximum cache size, the oldest suspended app is removed from the cache.
* The app isn't suspended if Teams doesn't receive the `readyToUnload` signal from the app within 30 seconds after sending the `beforeUnload` notification.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is more natural to say The app is terminated if ...

* App suspension is disabled if the system memory is less than 4 GB or if the available memory is less than 1 GB on Windows or 512 MB on Mac.
* Side panel is the only supported frameContext for app suspension in meetings.
* App suspesnion isn't supported for meetings where the invited user count is more than 20.
* If an app fails to load, the app isn't suspended.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an app fails to load, the app is terminated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this should be in general

* Side panel is the only supported frameContext for app caching in meetings.
* App caching isn't supported for meetings where the invited user count is more than 20.
* If an app fails to load, the app isn't cached.
* If the number of suspended apps exceeds the maximum cache size, the oldest suspended app is removed from the cache.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as you have in general above. We don't need it here


* Apps are expected to sleep when cached (use minimal compute or network resources and minimizes SDK requests). All the register handlers and the following SDK requests are allowed when the app is cached:
* Register only the `beforeSuspendOrTerminate` handler if your app doesn't require app suspension but needs time to safely save state (as leaving the app can cause the app content to be abruptly removed from the Document Object Model (DOM)). If the app hasn't registered for the `resume` event, it's removed from the DOM after the `suspendOrTerminate` flow completes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in general

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants