AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

Introduce wrap property on ChoiceSet/Toggle

Open dclaux opened this issue 8 years ago • 7 comments

Release Renderer status Tasks status
1.2 ✔️ .NET (#2219)
✔️ Android (#2218)
✔️ iOS (#2216)
✔️ TS (#2423)
✔️ UWP (#2217)
✔️ Shared (#2215)

Solves requests

  • Ability for ChoiceSet and Toggle text to wrap so that the text is all displayed (#1821)

Summary

Allow the authors to specify if they want their title to wrap. We could either:

  1. Change the current behavior and always wrap. The risk here is to degrade the experience for some existing scenarios
  2. Provide a setting in HostConfig to control title wrapping. This would allow hosts to opt into title wrapping
  3. Allow card authors to decide

I recommend option 3, with the default being "no wrap" to maintain compatibility with the current behavior.

Example

Add a wrap property to Input.Toggle:

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

Add a wrap property to Input.ChoiceSet:

{
    "type": "Input.ChoiceSet",
    "choices": [
        { "title": "This choice has a very long title", "value": "1" },
        { "title": "This is another choice", "value": "2" }
    ],
    "wrap": true
}

Host Config

No changes.

Down-level impact

Low. Content simply won't wrap, but it never did anyways.

Host burden

None. All handled by the renderer.

Renderer Requirements

  1. A renderer should respect the wrap property and display accordingly.

Auto-generated task status

  • [x] Shared
  • [x] .NET
  • [x] Android
  • [x] iOS
  • [x] TS
  • [x] UWP

dclaux avatar Sep 11 '18 23:09 dclaux

I also need this feature. Any ETA?

dkonyayev avatar Sep 26 '18 19:09 dkonyayev

This will most likely be part of our 1.2 release. No firm date on it though.

khouzam avatar Sep 26 '18 19:09 khouzam

Proposal approved. Note that we also liked the proposal for adding a content property to ChoiceSet/Toggle, but for simplicity purposes, being able to easily control the text wrapping is desirable, so we also want this proposal.

andrewleader avatar Oct 03 '18 23:10 andrewleader

Got an ETA for that?

Shon-Elias avatar Dec 19 '18 12:12 Shon-Elias

@Shon-Elias this will most likely be part of our 1.2 release. We don't have a release date to share yet, 1.1 was just released two months ago.

andrewleader avatar Dec 19 '18 17:12 andrewleader

Version 1.2 was released but it does not support most of the channels.

I would like to use this feature for MS Teams but at the moment you are supporting only version 1.0.

Why is it take that long to support that feature? when will it be available for MS Teams users?

Shon-Elias avatar Jun 12 '19 09:06 Shon-Elias

Microsoft Teams is working on updating to 1.2. You can send your feedback to them using their UserVoice: https://microsoftteams.uservoice.com/forums/555103-public

andrewleader avatar Jun 12 '19 15:06 andrewleader