atomist / sdm-pack-lifecycle

Extension pack to add lifecycle support into an SDM
Apache License 2.0
0 stars 1 forks source link

Provide data in card for rendering in web-app dialogs #10

Closed cdupuis closed 5 years ago

cdupuis commented 5 years ago

Issue moved from atomist/card-automation#7

Created by @jrday at 2019-06-26T01:19:25Z:

The dialogs in web-app should get the same data as chat for consistency.

A Slack cancel goals dialog:

Screen Shot 2019-06-25 at 15 39 22

A similar dialog in web-app:

Screen Shot 2019-06-25 at 18 17 30

@drewmca has details on the differing payloads – the card pushed is not getting the same data as the chat message.

cdupuis commented 5 years ago

Yes, we never designed the card actions to have confirmation information. Adding this now.

cdupuis commented 5 years ago

The card action will now have the following additional properties if a confirmation is requested:


confirm: {
  title: string,
  body: string,
  ok?: string,
  dismiss?: string,
}
drewmca commented 5 years ago

@jrday

drewmca commented 5 years ago

@cdupuis is this additional data in staging yet? I'm not seeing it come across for a card with a "Cancel" button.

cdupuis commented 5 years ago

Yes, this is even in prod. And I have confirmed that it works fine. I see the above on cards.

drewmca commented 5 years ago

@cdupuis I'm not seeing it. I thought it might be because I was looking at old cards, so i created a new project with goalsets. The goalset has a cancel action, and the data looks like this:

{
  "text": "Cancel",
  "type": "button",
  "registration": "@atomist/lifecycle-automation",
  "command": "CancelGoalSets",
  "parameters": [
    {
      "name": "goalSetId",
      "value": "5d3fb4e9-8059-4d87-94e0-e19f8bfab977"
    }
  ],
  "parameterName": null,
  "parameterOptions": [],
  "parameterOptionGroups": [],
  "role": null
}
drewmca commented 5 years ago

Maybe the difference is that this is an action contained within a goalset?

cdupuis commented 5 years ago

Are you including the confirm property in your query? From the result I suspect not.

drewmca commented 5 years ago

doh...