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

Initial support for toggling visibility #246

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Dec 7, 2023

Changes

  • 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

References

- 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
@atc0005 atc0005 added documentation Improvements or additions to documentation enhancement New feature or request card format/adaptivecard Adaptive Card support validation labels Dec 7, 2023
@atc0005 atc0005 added this to the v2.9.0-alpha.1 milestone Dec 7, 2023
@atc0005 atc0005 self-assigned this Dec 7, 2023
@atc0005 atc0005 merged commit a09de7c into development Dec 7, 2023
27 of 28 checks passed
@atc0005 atc0005 deleted the i243-toggle-visibility-support branch December 7, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
card format/adaptivecard Adaptive Card support documentation Improvements or additions to documentation enhancement New feature or request validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant