Skip to content

[Rendering] Event Handler for ToggleVisibilityAction #6742

@rahulamlekar

Description

@rahulamlekar

Target Platforms

NodeJS

SDK Version

1.4

Application Name

Berlin

Problem Description

From dev - I'm currently working on telemetry for Adaptive Card actions like ShowCard and ToggleVisibility. One concern that was brought up to me was that OnElementVisibilityChanged is called for each target element listed within a ToggleVisibility action and with the current way our telemetry is setup, there would be 3 telemetry events logged for each target element. We'd like to avoid duplicate events and ideally want one telemetry event per ToggleVisibility action.

From what I can tell in card-elements.d.ts, there's no handler for ToggleVisibility actions so logging a telemetry event for the ToggleVisibility invocation itself would require some work on our end. Is there an easy way to do this that I missed or examples of how others have handled this in the past?

David's solution - ToggleVisibilityAction indeed doesn’t trigger the onExecuteAction event; I think it should, which would solve your problem. It’s a very simple change that I assume the team could take for you guys. It just requires adding super.execute(); at the beginning of the ToggleVisibilityAction.execute() implementation.

Paul asked to file a GitHub issue.

Screenshots

No response

Card JSON

NA

Sample Code Language

No response

Sample Code

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions