-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to handle ToggleVisibility for table/columns #239
Comments
Hi @dhartford, While I'm not familiar enough with Microsoft Teams to know the answer for sure, this library is mostly (at present) focused on submitting messages (formatted or not) through a webhook connector. This is a one-way data submission and I'm not sure that there would be enough feedback for the client using this library to use in making a decision based on toggling the UI element. |
thanks for the quick response!!! Not looking for feedback/decisions, just 'hide' and 'show' with the toggle feature only (the visual side only) |
@dhartford So are you asking whether you can embed JavaScript in the payload to make the delivered message in Microsoft Teams behave the way that the https://adaptivecards.io/samples/ExpenseReport.html demo does? |
I mis-spoke - JSON template and JSON dataset (edited original ask), I was thinking javascript notation but only wrote javascript - sorry for the confusion!!!! The example uses some special syntax as well as 'order' for the toggle visibility to work on certain containers that I can't quite seem to get with the API, which is why I was wondering if could do a 'raw' approach first until iterate it into the API in a meaningful (versus rushed) way. ` "type": "Container",
and `
|
@dhartford Thanks for the additional details/clarification. I appreciate the desire to prototype before implementing library changes. When I'm prototyping changes to this library or a client tool I maintain I often fallback to using the approach noted here: If you can craft a JSON file that you're able to successfully deliver to a Microsoft Teams webhook (e.g., via curl) then it's very likely that this library could grow the feature to do the same, either in a raw manner as you've indicated or in another form. Please give that approach a try and let me know what results you get. |
@dhartford see also this recent request: |
- add Element.Visible field - to control visibility of Elements - if not specified, this value defaults to true by omitting the field from the generated JSON payload - add TargetElement type - add Action.TargetElement field - to specify collection of TargetElement values - used to specify target Element values whose visibility state should be controlled by the Element whose Action the TargetElement field is associated with - add ISelectAction.TargetElements field - same purpose as Action.TargetElement field - add missing validation for Element.SelectAction field for Element of ColumnSet type - add missing validation for Element.SelectAction field for Element of Container type - add Column.AddSelectAction method - accepts Action or ISelectAction value - update ISelectAction.Validate method - add missing validation for ISelectAction.Fallback field - add validation for ISelectAction.TargetElements field for Action.ToggleVisibility type - update Action.Validate method - convert validation logic to use validator package - add Action.AddTargetElement method - accepts multiple Element values - allows explicitly setting target Element visibility - add Action.AddVisibleTargetElement method - convienence method to explicitly enable visibility for target Element values - add Action.AddHiddenTargetElement method - convienence method to explicitly disable visibility for target Element values - add Action.AddTargetElementID method - accepts multiple Element ID values - allows explicitly setting target Element visibility - add new helper "constructor" functions - NewHiddenerContainer - NewColumn - NewColumnSet - NewHiddenTextBlock - NewActionToggleVisibility - update Container.AddAction - add note to doc comments directing reader to Container.AddSelectAction for adding an Action to be used when the Container is tapped or selected - add Container.AddSelectAction method - accepts Action or ISelectAction value - add examples - add toggle-visibility-column-action - add toggle-visibility-container-action - add toggle-visibility-multiple-buttons - add toggle-visibility-single-button refs GH-243 refs GH-239
@dhartford The initial prototype support can be found in the v2.9.0-alpha.1 release here: Examples are included. Feedback is welcome. |
Hi @dhartford , Just checking to make sure you saw my last note. |
- add Element.Visible field - to control visibility of Elements - if not specified, this value defaults to true by omitting the field from the generated JSON payload - add TargetElement type - add Action.TargetElement field - to specify collection of TargetElement values - used to specify target Element values whose visibility state should be controlled by the Element whose Action the TargetElement field is associated with - add ISelectAction.TargetElements field - same purpose as Action.TargetElement field - add missing validation for Element.SelectAction field for Element of ColumnSet type - add missing validation for Element.SelectAction field for Element of Container type - add Column.AddSelectAction method - accepts Action or ISelectAction value - update ISelectAction.Validate method - add missing validation for ISelectAction.Fallback field - add validation for ISelectAction.TargetElements field for Action.ToggleVisibility type - update Action.Validate method - convert validation logic to use validator package - add Action.AddTargetElement method - accepts multiple Element values - allows explicitly setting target Element visibility - add Action.AddVisibleTargetElement method - convienence method to explicitly enable visibility for target Element values - add Action.AddHiddenTargetElement method - convienence method to explicitly disable visibility for target Element values - add Action.AddTargetElementID method - accepts multiple Element ID values - allows explicitly setting target Element visibility - add new helper "constructor" functions - NewHiddenerContainer - NewColumn - NewColumnSet - NewHiddenTextBlock - NewActionToggleVisibility - update Container.AddAction - add note to doc comments directing reader to Container.AddSelectAction for adding an Action to be used when the Container is tapped or selected - add Container.AddSelectAction method - accepts Action or ISelectAction value - add examples - add toggle-visibility-column-action - add toggle-visibility-container-action - add toggle-visibility-multiple-buttons - add toggle-visibility-single-button refs GH-243 refs GH-239
Hi everyone,
I'm curious if there is a way to handle the chevron-style expand/collapse as shown here:
https://adaptivecards.io/samples/ExpenseReport.html
If there isn't a good way, is there a way to take the raw JSON (template) and raw JSON data and send it through this library?
TIA!!!
The text was updated successfully, but these errors were encountered: