microsoft / microsoft/AdaptiveCards
[JS] selectAction type should be changed to ISubmitAction | IOpenUrlAction | IShowCardAction
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Target Platforms
NodeJS
SDK Version
2.9.0
Application Name
Microsoft Viva Connections
Problem Description
We have encountered an issue with the way selectAction is typed in the IContainer, IColumn, IImage interfaces.
It is typed as an IAction, which means that specifying a Submit action, or any other type of action fails to compile.
A solution is to change the typing to ISubmitAction | IOpenUrlAction | IShowCardAction
Also, IAction should be changed to:
export interface IAction {
id: string;
title?: string;
type: 'Action.Submit' | 'Action.OpenUrl' | 'Action.ShowCard'
}
Screenshots
No response
Card JSON
n/a
Sample Code Language
No response
Sample Code
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with source/nodejs/adaptivecards/src/schema.ts around line 170, where IAction and the selectAction properties on IContainer, IColumn, and IImage are defined. Compare the declared action types with the issue's proposed unions, then verify that valid Submit, OpenUrl, and ShowCard actions compile correctly in the NodeJS SDK.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100