From 0fbfda95acf7f1001cda90e187cec336ee7fd0b8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 29 Nov 2018 18:48:46 +0100 Subject: [PATCH] ProtoXEP Buttons: A XEP about clicking things --- inbox/buttons.xml | 168 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 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.

+ + +
+
+ +