Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Add shorthand properties for standard card small image and text #628

@habuma

Description

@habuma

Is your feature request related to a problem? Please describe.
When using simple cards, the cardTitle and cardContent shorthand properties are great. But when using standard cards, we need more.

Firstly, as odd as it may be, the response for a standard card doesn't have a response.card.content property but it does have a response.card.text property. Unfortunately, the cardContent shorthand won't match against that property's value, forcing me to use the longhand property.

Also, while cardImageURL does help me with the large image, there's no shorthand to test for the small URL.

Describe the solution you'd like
I'd like to see either a new cardText shorthand property that refers to response.card.text or for cardContent to match either response.card.content or response.card.text, whichever is available.

I'd also like to see a new cardSmallImageURL to refer to the response.card.image.smallImageUrl property. For consistency's sake, maybe also introduce a cardLargeImageURL that's synonymous with cardImageURL (but that's optional).

Describe alternatives you've considered
The only alternatives are to use longhand property references. In the case of a standard card, that forces an awkward mix of short and longhand properties:

  - cardTitle: "Card Title"
  - response.card.text: "This is the card text."
  - cardImageURL: "https://example.com/largeImage.jpg"
  - response.card.image.smallImageUrl: "https://example.com/smallImage.jpg"

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions