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

[UWP] Add support for action overflow #6150

Merged
merged 8 commits into from
Aug 5, 2021
Merged

Conversation

RebeccaAnne
Copy link
Contributor

@RebeccaAnne RebeccaAnne commented Jul 31, 2021

Related Issue

Fixes #5494
Fixes #5495

Description

Add support for action overflow to UWP. The majority of the code in this PR is in aid of supporting the spec'd show card behavior where a show card in an overflow menu needs to switch places with the last primary button when invoked. This required more logic and bookkeeping around show card actions.

As part of that bookkeeping, more information needed to be registered with the render context via AddInlineShowCard. Because of that, that function started to feel more implementation specific than felt right for the public API surface. With this change, hosts who are custom rendering ActionSets (not individual actions) will need to manage their own inline show cards. This seems like a reasonable requirement for a host custom rendering the entire action set.

Sample Card

Moved the existing sample card to the Test directory and added some more cases to it. Created a new sample card in elements to be the sample for the webpage. With this change the two sample cards for overflow are:

\samples\v1.5\Elements\Action.Mode.json
samples\v1.5\Test\ActionModeTestCard.json

How Verified

  • Updated and verified behavior in the two sample cards discussed above
  • Updates to the object model unit tests to verify new properties
  • Renderer test to validate OverflowMaxActions behavior
Microsoft Reviewers: Open in CodeFlow

@almedina-ms
Copy link
Contributor

almedina-ms commented Aug 3, 2021

/* Header file automatically generated from AdaptiveCards.ObjectModel.Uwp.idl */

Should this file be added? It looks like it's a product of some compilation


In reply to: 892048249


Refers to: source/uwp/AdaptiveCardsObjectModel/AdaptiveCards.ObjectModel.Uwp.h:1 in cd79747. [](commit_id = cd79747, deletion_comment = False)

@RebeccaAnne
Copy link
Contributor Author

/* Header file automatically generated from AdaptiveCards.ObjectModel.Uwp.idl */

It should not. Unfortunately it was accidently added to this branch before it was added to .gitignore in another change list. Now i can't get git to notice I'm deleting it to remove it from this change list even if i take it out of the .gitignore. I might have to delete it in a separate change to un-confuse git.


In reply to: 892048249


Refers to: source/uwp/AdaptiveCardsObjectModel/AdaptiveCards.ObjectModel.Uwp.h:1 in cd79747. [](commit_id = cd79747, deletion_comment = False)

Copy link
Member

@paulcam206 paulcam206 left a comment

Choose a reason for hiding this comment

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

largely looks good. this was a ton a work!

samples/v1.5/Test/ActionModeTestCard.json Outdated Show resolved Hide resolved
source/uwp/Renderer/lib/ActionHelpers.cpp Outdated Show resolved Hide resolved
source/uwp/Renderer/lib/ActionHelpers.cpp Outdated Show resolved Hide resolved
source/uwp/Renderer/lib/ActionHelpers.cpp Show resolved Hide resolved
source/uwp/Renderer/lib/ActionHelpers.cpp Outdated Show resolved Hide resolved
source/uwp/Renderer/lib/ActionHelpers.cpp Show resolved Hide resolved
source/uwp/Renderer/lib/AdaptiveHostConfig.cpp Outdated Show resolved Hide resolved
source/uwp/Renderer/lib/ActionHelpers.h Outdated Show resolved Hide resolved
source/uwp/Renderer/lib/RenderedAdaptiveCard.cpp Outdated Show resolved Hide resolved
Co-authored-by: Paul Campbell <paulcam@microsoft.com>
@ghost ghost removed the Needs: Author Feedback label Aug 5, 2021
RebeccaAnne and others added 4 commits August 5, 2021 11:05
@RebeccaAnne RebeccaAnne merged commit 74b19c1 into main Aug 5, 2021
@RebeccaAnne RebeccaAnne deleted the rebecch/actionoverflow branch August 5, 2021 21:40
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* [UWP] Add support for action overflow

* PR Feedback

* Update source/uwp/Renderer/lib/ActionHelpers.cpp

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* Update source/uwp/Renderer/lib/ActionHelpers.cpp

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* Update source/uwp/Renderer/lib/AdaptiveHostConfig.cpp

Co-authored-by: Paul Campbell <paulcam@microsoft.com>

* PR feedback

Co-authored-by: Paul Campbell <paulcam@microsoft.com>
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.

[UWP] Renderer support for ActionSet overflow [UWP] Object model support for ActionSet overflow
3 participants