fix(ux): Onboarding-Buttons — blaue Nummern statt Text-Labels (12→6 Buttons)
Pro Raum: EIN blauer Nummern-Button (1️⃣, 2️⃣, …) via style='primary' Globale Buttons: ⏭️ Alle überspringen, ⏰ Später Payload: ONBOARD:<rid>::select, ONBOARD::skip_all, ONBOARD::later UX-Fix: Rocket.Chat UI hat feste Button-Breite — 12 Buttons (4 Räume × 3 Aktionen) wurden auf 1 Buchstabe gekürzt. 6 Buttons (4 Nummern + 2 global) passen ohne Truncation.
This commit is contained in:
+7
-2
@@ -52,11 +52,16 @@ _TEMPLATE_MAP = {
|
||||
}
|
||||
|
||||
|
||||
def _build_custom_buttons(labels: list, prefix: str = "") -> list:
|
||||
def _build_custom_buttons(labels: list, prefix: str = "", style: str = "default") -> list:
|
||||
"""Build Rocket.Chat action buttons from plain label strings.
|
||||
|
||||
Rocket.Chat UI truncates button text after ~11-12 chars.
|
||||
Use short labels (emoji+text without spaces, or numbered refs).
|
||||
|
||||
Args:
|
||||
labels: Button display texts (keep short — emoji preferred)
|
||||
prefix: Payload prefix for correlation (e.g. "ONBOARD:<rid>")
|
||||
style: Rocket.Chat button style — "default" (grey) or "primary" (blue)
|
||||
"""
|
||||
buttons = []
|
||||
for idx, label in enumerate(labels):
|
||||
@@ -71,7 +76,7 @@ def _build_custom_buttons(labels: list, prefix: str = "") -> list:
|
||||
"text": display,
|
||||
"msg": msg_payload,
|
||||
"msg_in_chat_window": True,
|
||||
"style": "default",
|
||||
"style": style,
|
||||
})
|
||||
return buttons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user