microsoft / microsoft/AdaptiveCards

[Rendering] adaptiveCard.onExecuteAction - unable to get source element's action trigger

Open
#8,670 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Renderers Bug
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Target Platforms

NodeJS, Other

SDK Version

2.9.0

Application Name

Adaptive Card- (v1.3)

Problem Description

i'm using adaptive cards v1.3 and "adaptivecards": "2.9.0"

unable to get source element's action trigger using adaptiveCard.onExecuteAction

  • adaptiveCard.onExecuteAction = (action: Action) method we don't get the source from which element and where this action been called.
  • we want to know where is the trigger happens from button, container or text.
Screenshots

No response

Card JSON
{
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "type": "AdaptiveCard",
 "version": "1.0",
 "body": [
  {
   "type": "TextBlock",
   "text": "Click the cat!",
   "weight": "bolder"
  },
  {
   "type": "Image",
   "url": "https://adaptivecards.io/content/cats/1.png",
   "selectAction": {
    "type": "Action.OpenUrl",
    "title": "cool link",
    "url": "https://www.elgoog.im",
   }
  }
 ]
}
Sample Code Language

javascript

Sample Code
    import * as AdaptiveCard from 'adaptivecards';
    const adaptiveCard = new AdaptiveCard.AdaptiveCard();
    
   adaptiveCard.onExecuteAction = (action: Action) => {
   // in this method we don't get the source from which element and where this action been called . 
   // we want to know where is the trigger happens from button, container or text.
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the JavaScript AdaptiveCard rendering path and the adaptiveCard.onExecuteAction callback shown in the issue. Determine how actions from buttons, containers, or text are represented, then add source-trigger information to the callback contract and cover those trigger types with tests.】【。

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.