Skip to content

Adaptive Card Tabs #1486

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

Merged
merged 11 commits into from
Feb 17, 2021
Merged

Adaptive Card Tabs #1486

merged 11 commits into from
Feb 17, 2021

Conversation

axelsrz
Copy link
Member

@axelsrz axelsrz commented Feb 1, 2021

Fixes #1463

@tracyboehrer tracyboehrer changed the title Some teams models ported Adaptive Card Tabs Feb 1, 2021

:returns: A Tab Response for the request.
"""
return

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks a lot for piointing this! I moved the methods to their corresponding place on added this fix

"""

_attribute_map = {
"tab_entity_context": {"key": "tabEntityContext", "type": "TabEntityContext"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this look for the JSON property, tabContext? See .NET

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

"""

_attribute_map = {
"tab_entity_context": {"key": "tabEntityContext", "type": "TabEntityContext"},
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we need the same tabContext change here.


_attribute_map = {
"type": {"key": "type", "type": "str"},
"properties": {"key": "properties", "type": "object"},
Copy link
Contributor

@mdrichardson mdrichardson Feb 3, 2021

Choose a reason for hiding this comment

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

I don't believe this will parse correctly (but I don't know Python well, so SUPER open to being wrong, here). The spec is:

{
    "name": "tab/submit",
    "value": {
        "data": {
            "type": "tab/submit",
            // ... <data properties>
        },
        [...]
}

My understanding is that there won't be a properties key, so much as an unknown amount keys with unknown names. @EricDahlvang @clearab Is this a correct interpretation of the spec?

If so, here's how I handled it in JS (not sure what the Py equivalent is).

Copy link
Member

Choose a reason for hiding this comment

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

This should be handled similarly to the Properties field on Entity, ConversationAccount, ChannelAccount, Activity, etc.

@EricDahlvang
Copy link
Member

@axelsrz i think this looks good, but need a sample to test against... can you port this one: microsoft/BotBuilder-Samples#3072

@joshgummersall joshgummersall removed their request for review February 11, 2021 00:30
@axelsrz axelsrz marked this pull request as ready for review February 17, 2021 04:12
@axelsrz axelsrz requested a review from mdrichardson February 17, 2021 17:42
Copy link
Member

@EricDahlvang EricDahlvang left a comment

Choose a reason for hiding this comment

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

Thanks @axelsrz !

@axelsrz axelsrz merged commit 4533425 into main Feb 17, 2021
@axelsrz axelsrz deleted the axsuarez/teams-ac-tabs branch February 17, 2021 17:46
axelsrz added a commit that referenced this pull request Feb 17, 2021
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.

Adaptive Card Tabs (Python)
3 participants