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 #251

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Jan 25, 2024

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 Jan 25, 2024
@atc0005 atc0005 added this to the v2.9.0 milestone Jan 25, 2024
@atc0005 atc0005 self-assigned this Jan 25, 2024
@atc0005 atc0005 merged commit 060a97d into master Jan 25, 2024
28 of 30 checks passed
@atc0005 atc0005 deleted the i243-toggle-visibility-support branch January 25, 2024 13:20
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.

Support for ToggleVisibility How to handle ToggleVisibility for table/columns
1 participant