From 44165c1869ccbd06e73509b06649f89e3b36d531 Mon Sep 17 00:00:00 2001 From: Tim Henkes Date: Tue, 21 Apr 2020 00:07:45 +0200 Subject: [PATCH] un-rm inbox/buttons.xml --- inbox/buttons.xml | 168 +++++++++++++++++++++++++++++++++++++++ inbox/quick-response.xml | 1 + 2 files changed, 169 insertions(+) create mode 100644 inbox/buttons.xml diff --git a/inbox/buttons.xml b/inbox/buttons.xml new file mode 100644 index 00000000..84108283 --- /dev/null +++ b/inbox/buttons.xml @@ -0,0 +1,168 @@ + + +%ents; +]> + +
+Simple Buttons +This specification provides a way to send simple buttons. +&LEGALNOTICE; +xxxx +ProtoXEP +Standards Track +Standards + +XMPP Core + + + +NOT_YET_ASSIGNED + +Kim +Alvefur +zash@zash.se +zash@zash.se + + +0.0.2 +2018-09-30 +ka +Polishing preparing for submission + + +0.0.1 +2018-09-02 +ka +Initial version + +
+ + +

Having actionable buttons in chats is apparently a fashionable thing +now. This specification defines a simple protocol for buttons and +responses.

+ +
+ +
    +
  • To provide a representation of a simple button or two in a chat.
  • +
+ + + +
    +
  • Is "button" too UI-centric? + +
      +
    • Could base it on the <action> element from ad-hoc?
    • +
  • +
  • Styling? Maybe a few fixed styles like normal, warning, danger?
  • +
+ +
+ +

OPTIONAL.

+ +
+
Button
+
An actionable object that can be invoked.
+
Click
+
The act of invoking the actionable object.
+
+ +
+ +

A chat bot wants to provide fixed choice answers or commands.

+ +
+ + + +

A button is represented by a <button> element in the +urn:xmpp:tmp:buttons.

+ + + +]]> + +
+
value
+
Textual payload to be sent in a message <body> when the button is +clicked.
+
<label>
+
Text label for the button. Can be repeated per language.
+
+ +
+ + + +

A message with buttons is sent by including one or more <button> +elements with distinct value attributes. At least one <label> element +MUST be included containing a textual description for the button.

+ + + Approve? (yes/no) + + +]]> + +

A single message MUST NOT have multiple buttons with the same @value.

+ +
+ +

When the user clicks a button, their client sends a plain text message +body containing the @value as <body> text.

+ + + yes +]]> + +
+ +

OPTIONAL. TODO.

+ +
+ +

OPTIONAL. TODO.

+ +
+ +

Accessibility for whom?

+ +
+ +

Multiple instances of the <label/> element MAY be included for the +purpose of providing alternate versions of the same text in different +languages, i.e. with distinct xml:lang attributes.

+ +
+ +

Do not press the big red button marked "Danger: Do Not Push".

+ +
+ +

None.

+ +
+ +

Register the namespace etc.

+ +
+ +

REQUIRED for protocol specifications.

+ + +
+
+ + diff --git a/inbox/quick-response.xml b/inbox/quick-response.xml index 8da9839f..75319bca 100644 --- a/inbox/quick-response.xml +++ b/inbox/quick-response.xml @@ -5,6 +5,7 @@ %ents; ]> +