question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inlineAction on text boxes

See original GitHub issue
Release Renderer status Tasks status
1.2 ✔️ .NET (#1359)
✔️ Android (#1285)
✔️ iOS (#1284)
✔️ TS (#1360)
✔️ UWP (#1283)
✔️ Shared (#1282)
✔️ Designer (#2674)

Solves requests

  • Ability to display image button to right of input for quick-reply toast (#1992)

Example Comps

image

Notice how Android notifications choose to display the button as part of the text input. The payload should allow this flexibility for the host to display the button however makes sense.

image

Spec

Schema Changes

On only Input.Text (since that seems to be the only place a quick action would be desired on an input), the following property would be added…

Property Type Required Description
type Input.Text true
inlineAction Action false The inline action for the input. Typically displayed to the right of the input. Strongly recommended you provide an icon on the action (which will be displayed instead of the title of the action).

Schema example

{
  "type": "Input.Text",
  "id": "comment",
  "placeholder": "enter comment",
  "inlineAction": {
    "type": "Action.Submit",
    "iconUrl": "ms-appx:///Assets/reply.png",
    "title": "Reply"
  }
}

Host Config

Renderer Requirements

  • A renderer must display the inlineAction however the native platform typically displays actions related to a text input. For example, on UWP, should be displayed like the following

image

Android might display like the following…

image

  • If there is an icon on the action, simply use the icon (don’t display the text). The title text should be used as a tooltip on the action.
    • The icon should use the same fitting behavior as normal icon actions (if the icon is 100px tall and only 50px wide, it should behave the same here as it does when it’s a normal icon action)
  • If there’s no icon, display the title instead.

image

  • Inline expansion of Action.ShowCard is NOT supported (since we don’t support inline showcards within the body right now). If a show card is present and the host is configured for inline show cards the action will be dropped and a warning will be returned.

  • A renderer must invoke the inlineAction when the user performs the native platform action for submitting a text field…

    • For example…
      • On UWP…
        • For a single line text input, enter will trigger the action (shift-enter and ctrl-enter will be ignored).
        • For a multiline text input, enter will add a newline.
      • On iOS
        • If isMultiline is NOT enabled
          • The virtual keyboard should display the “submit” button and pressing that should submit the button.
        • If isMultiline IS enabled
          • The virtual keyboard should be left as-is (leaving the normal enter button that adds a newline, since otherwise there’s no way to add newlines).
  • Renderers must assign a style of InlineAction (or whatever the renderer standard for style names is) to the button so that hosts can natively style the button as they wish

Downlevel Impact

High

This will not be able to render properly, and the card will be unfunctional.

Host impact: Medium. Hosts need to update their native styling to include this new InlineAction button.

Related features

  • Associating a text box enter press with an action: #333

Auto-generated task status

  • Shared
  • Designer
  • .NET
  • Android
  • iOS
  • TS
  • UWP

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
matthidingercommented, Apr 16, 2018

What if we add something semantic like quickReplyAction on Input.Text (since that seems to be the only real-world scenario where a quick-reply would be used).

We would also need to get in #389 Action/Image support

 {
      "type": "Input.Text",
      "id": "comment",
      "placeholder": "enter comment",
      "maxLength": 500,
      "isMultiline": false,
      "speak": "What comments do you have?",
      "value": "This is a pre-filled value",
      "defaultAction": {
           "showButton": false,
           "action": { 
               "type": "Action.Submit" 
           }
      }
}
1reaction
khouzamcommented, Oct 22, 2018

I think that we’ll need an iconSize property as we have in the Icons in Actions fir the renderers that cannot easily calculate the height of the text box (HTML and Typescript).

Read more comments on GitHub >

github_iconTop Results From Across the Web

inlineAction on text boxes #147 - microsoft/AdaptiveCards
A renderer must invoke the inlineAction when the user performs the native platform action for submitting a text field... For example.
Read more >
Input.Text - Schema Explorer - Adaptive Cards
The inline action for the input. Typically displayed to the right of the input. It is strongly recommended to provide an icon on...
Read more >
Inline action does not show with Long Text field
I have a detail view which is using a card-style layout. In the main body of the view I have three columns.
Read more >
Input.Text
The inline action for the input. Typically displayed to the right of the input. It is strongly recommended to provide an icon on...
Read more >
Getting text box names and text boxes inline - html
Currently the text box names and text boxes are one after the other. For example: NIC and its text box are not inline....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found