question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[HTML] Custom Parsing of Action Objects

See original GitHub issue

Problem

There is no way to custom parse actions similar to how it is possible to custom parse elements.

Design

Have a global and per-card action parsing eventHandler(like other events)

export class AdaptiveCard {
    ...
    static onParseAction: (action: Action, json: any) => void = null;
    onParseAction: (action: Action, json: any) => void = null;
    ...
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dclauxcommented, Jun 10, 2018

@ignacionr Action.Submit, at least as loosely defined as it is defined right now, actually doesn’t suit the needs of some clients. Bots have an implicit underlying communication channel over which all messages between the client and the “server” (the Bot) can be sent and received. Outlook, for one, doesn’t have that. Outlook does have its implicit communication channel with Exchange, but Exchange isn’t the third party service that needs to be reached when an action is executed. Outlook wanted/needed another type of more explicit action model, and that model the Action.Http action type. More info here: https://docs.microsoft.com/en-us/outlook/actionable-messages/adaptive-card#actionhttp

While it is true that technically each host can document that the data property of an Action.Submit is to be formatted this way or that way, it remains a not-well-defined property bag and Outlook favored a more strongly-typed approach.

All that said, the action model is unrelated to this change which is only about visuals.

1reaction
dptejascommented, Jun 10, 2018

In outlook actionable message, developer can mark an action as “primary” so that it can get a different visual treatment. Since “primary” is not a open schema for adaptiveCards , in outlook we need support to parse actions custom similar to custom parse elements. Let me know if you need more information on the same

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - Custom page or action on "XML Parsing Error"
Question. Is there any possibility to tell browser via HTTP header or html code what to do when XML Parsing Error occurs?
Read more >
Customize parsing strategies
Parsing strategies are part of discovery patterns, which Service Mapping and Discovery use to discover and map configuration items (CIs). Before you begin....
Read more >
HTMLDocument.HTMLReader (Java Platform SE 8 )
An HTML reader to load an HTML document with an HTML element structure. ... HTMLReader.TagAction. An action to be performed in response to...
Read more >
13.2 Parsing HTML documents - HTML Standard - WhatWG
User agents must use the parsing rules described in this section to generate the DOM trees from text/html resources.
Read more >
JSON.parse() - JavaScript - MDN Web Docs - Mozilla
The JSON.parse() static method parses a JSON string, constructing the JavaScript value or object described by the string.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found