Port: feat: Support for SharePoint (Viva) Adaptive Card Extension #2201
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #minor
Description
Porting changes from feat: Support for SharePoint (Viva) Adaptive Card Extension #6695
SharePoint Framework is adding a new adaptive card experience (ACE) where it is powered by a Bot. In order to be able to implement the bot we are updating the BotBuilder Framework to natively support these API's to make it easier for end users to add a bot powered ACE.
Specific Changes
We support 5 new BotInvoke activities:
cardExtension/getCardView
cardExtension/getQuickView
cardExtension/getPropertyPaneConfiguration
cardExtension/setPropertyPaneConfiguration
cardExtension/handleAction
The SharePointActivityHandler in
botbuilder.core
is the base class for developing a bot powered ACE. Users of this base class will need to implement the following 5 methods:on_sharepoint_task_get_card_view
on_sharepoint_task_get_quick_view
on_sharepoint_task_get_property_pane_configuration
on_sharepoint_task_set_property_pane_configuration
on_sharepoint_task_handle_action
Testing
Below image shows the new unit tests are passing.
![Tests_SharePoint adaptive card experience](https://private-user-images.githubusercontent.com/164224646/410445500-a89bc1a4-451e-4c10-abff-4aaa62bbbec0.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTA1NjAsIm5iZiI6MTczOTIxMDI2MCwicGF0aCI6Ii8xNjQyMjQ2NDYvNDEwNDQ1NTAwLWE4OWJjMWE0LTQ1MWUtNGMxMC1hYmZmLTRhYWE2MmJiYmVjMC5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxNzU3NDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNGIxOTc0OWIzODc2NDU4NzczOGI3NzU4NGJmMGI4NGIyMmNiMTI4MmRkMTdkMTUwY2Y1MGJjM2EwMTkxN2Y1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.aaCg3qhoomRr681G56caO_u18XDluqWLbJde3Lm1VXA)