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

[TS][Renderer] Input.Number.value as string in Action.Submit #5134

Merged
merged 2 commits into from
Dec 7, 2020

Conversation

dclaux
Copy link
Member

@dclaux dclaux commented Dec 7, 2020

Related Issue

Fixes #5111

Description

Reverts to emitting Input.Number.value as a string in an Action.Submit.data

Sample Card

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Input.Number",
            "placeholder": "Placeholder text",
            "min": 1,
            "max": 10,
            "value": 8,
            "id": "fsd"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Action.Submit"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3"
}

How Verified

Verified manually in adaptivecards-designer-app

Microsoft Reviewers: Open in CodeFlow

@ghost
Copy link

ghost commented Dec 7, 2020

Hi @dclaux. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes.

@@ -11,7 +11,7 @@
"start": "hexo server"
},
"hexo": {
"version": "5.2.0"
"version": "4.2.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think you meant to change this :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't, but then help me understand how it happened - I litterally just compiled (npx lerna run build)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure really -- might be something hexo modified when you were testing your changes?

@@ -3983,7 +3983,7 @@ export class SubmitAction extends Action {
let input = inputs[key];

if (input.id) {
this._processedData[input.id] = input.value;
this._processedData[input.id] = typeof input.value === "string" ? input.value : input.value.toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good :)

@ghost ghost removed the Needs: Author Feedback label Dec 7, 2020
Copy link
Member

@paulcam206 paulcam206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the package.json update! changes look good

:shipit:

@dclaux dclaux merged commit 58e35db into main Dec 7, 2020
@dclaux dclaux deleted the js/input-number-as-strng-in-submit branch December 7, 2020 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JavaScript][Input.Number] [Type of value has changed with latest update]
2 participants