Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec draft: Support adaptive elements for title of ChoiceSet/Toggle #1980

Closed
andrewleader opened this issue Oct 1, 2018 · 1 comment
Closed

Comments

@andrewleader
Copy link
Contributor

andrewleader commented Oct 1, 2018

Solves requests

Summary

Allow specifying adaptive elements for the toggles and choice sets. That way, when authors also want to control the text size, or max lines, or use images, we don't have to add new properties for each of those - we already have those properties on TextBlock, etc.

Schema

New property on Input.Toggle and Input.ChoiceSet

Property Type Required Description
content AdaptiveElement false A rich adaptive element to be displayed instead of the string-based title.

Example

{
  "type": "Input.Toggle",
  "title": "This is a very long title",
  "content": {
    "type": "TextBlock",
    "text": "This is a very long title",
    "wrap": true
  }
}

Host Config

No changes.

Down-level impact

Low. The rich content doesn't get displayed, but it never did anyways. The title is a required property, so authors will always have to provide it, so their cards will still work well down-level even if they're not explicitly designing for it.

Host burden

None. Renderer handles it all.

Renderer Requirements

  1. A renderer should display the content instead of the title if possible.
@andrewleader
Copy link
Contributor Author

Proposal approved. Note however that we need to look at priorities and see if we should do this in 1.2 or not, since the text wrapping feature is being handled by a more simple proposal of just adding a wrap property. So this feature would specifically be solving requests for richer content.

@andrewleader andrewleader changed the title Proposal: Support adaptive elements for title of ChoiceSet/Toggle Spec draft: Support adaptive elements for title of ChoiceSet/Toggle Oct 3, 2018
@RebeccaAnne RebeccaAnne added this to the Backlog milestone Jul 24, 2020
@RebeccaAnne RebeccaAnne removed this from the Backlog milestone May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants