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

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

Open
habuma opened this issue Jan 15, 2020 · 1 comment
Open

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

habuma opened this issue Jan 15, 2020 · 1 comment
Labels

Comments

@habuma
Copy link

habuma commented Jan 15, 2020

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

@dmarvp
Copy link
Contributor

dmarvp commented Jan 15, 2020

Thanks @habuma , we'll take a look. But this one does seem like a lower priority item at the moment. It might take a while to see it implemented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants