Skip to content

Added richCardsWrapTitle to defaultStyleOptions#2115

Merged
corinagum merged 12 commits intomicrosoft:masterfrom
tdurnford:2046
Jul 1, 2019
Merged

Added richCardsWrapTitle to defaultStyleOptions#2115
corinagum merged 12 commits intomicrosoft:masterfrom
tdurnford:2046

Conversation

@tdurnford
Copy link
Copy Markdown
Contributor

@tdurnford tdurnford commented Jun 23, 2019

Fixes #2046

Changelog Entry

Added richCardsWrapTitle to defaultStyleOptions, by @tdurnford, in PR #2115

Specific Changes

Added richCardsWrapTitle to defaultStyleOptions and added styleOptions as a parameter to the AdaptiveCardsBuilder and as a prop for the CommonCard component. Developers should be able to wrap the title attribute in Rich Cards by setting richCardsWrapTitle in styleOptions to true.

image


  • Testing Added

@corinagum
Copy link
Copy Markdown
Contributor

Let's get a test on this one :)

Copy link
Copy Markdown
Contributor

@compulim compulim left a comment

Choose a reason for hiding this comment

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

Although I agree we should wrap the title, ellipsis looks too ugly today, are there any user asks for this?

I think wrapping the title will make the rich card looks pretty. Should we turn this on by default despite it is a breaking change?

Also, keep in mind that we want to move rich card away from Adaptive Card due to layout problems, enable rich card in minimal bundle, and enable more styling options for rich card.

Comment thread packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardBuilder.ts Outdated
Comment thread packages/bundle/src/adaptiveCards/Attachment/CommonCard.js Outdated
Comment thread packages/component/src/Styles/defaultStyleOptions.js Outdated
@tdurnford
Copy link
Copy Markdown
Contributor Author

The Support Team has seen an increase in issues regarding the title not wrapping, especially around QnA Prompting. I believe the SDK is mapping the prompts to Hero Cards and is adding the text response as the card's title. More often than not, the text is too long and gets truncated. We've been telling clients to either move the title to the card's text attribute or map the QnA prompt to an Adaptive Card themselves.

I'm torn on wrapping the title by default. I think it might be better to wait until we move Rich Cards away from using the Adaptive Card builder.

@compulim
Copy link
Copy Markdown
Contributor

compulim commented Jul 1, 2019

After discussing offline:

  • One option to set both title and subtitle
  • Default to either true or false, if false, then it's less breaking

@corinagum corinagum merged commit 0e86beb into microsoft:master Jul 1, 2019
@tdurnford tdurnford deleted the 2046 branch July 2, 2019 03:28
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.

thumbnailCard title too long will be ellipsis

3 participants