mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
fix(coach): keep the composer placeholder on one line
Shorten the composer placeholder across all locales to a short, inviting one-liner and clip the placeholder pseudo-element so a longer hint can never wrap to a second line inside the single-row composer on a narrow phone. The textarea value still wraps and auto-grows for real typing.
This commit is contained in:
1 parent
6d990b769c
commit
37339cf83e
8 files changed
+13
-8
No files matched your search
+1
-1
@@ -2094,7 +2094,7 @@
|
||||
"send": "Senden",
|
||||
"stop": "Stopp",
|
||||
"thinking": "Denke nach…",
|
||||
"composerPlaceholder": "Frag mich etwas zu deinen Daten…",
|
||||
"composerPlaceholder": "Frag mich etwas …",
|
||||
"nudgeBubbleLabel": "Neue Nachricht vom Coach — Chat öffnen",
|
||||
"fabLabel": "Coach öffnen",
|
||||
"readAloud": "Vorlesen",
|
||||
|
||||
+1
-1
@@ -2094,7 +2094,7 @@
|
||||
"send": "Send",
|
||||
"stop": "Stop",
|
||||
"thinking": "Thinking…",
|
||||
"composerPlaceholder": "Ask anything about your data…",
|
||||
"composerPlaceholder": "Ask me anything …",
|
||||
"nudgeBubbleLabel": "New message from the Coach — open chat",
|
||||
"fabLabel": "Open the Coach",
|
||||
"readAloud": "Read aloud",
|
||||
|
||||
+1
-1
@@ -2094,7 +2094,7 @@
|
||||
"send": "Enviar",
|
||||
"stop": "Detener",
|
||||
"thinking": "Pensando…",
|
||||
"composerPlaceholder": "Pregúntame sobre tus datos…",
|
||||
"composerPlaceholder": "Pregúntame algo …",
|
||||
"nudgeBubbleLabel": "Nuevo mensaje del coach — abrir el chat",
|
||||
"fabLabel": "Abrir el coach",
|
||||
"readAloud": "Leer en voz alta",
|
||||
|
||||
+1
-1
@@ -2094,7 +2094,7 @@
|
||||
"send": "Envoyer",
|
||||
"stop": "Arrêter",
|
||||
"thinking": "Réflexion en cours…",
|
||||
"composerPlaceholder": "Pose-moi une question sur tes données…",
|
||||
"composerPlaceholder": "Pose ta question …",
|
||||
"nudgeBubbleLabel": "Nouveau message du coach — ouvrir le chat",
|
||||
"fabLabel": "Ouvrir le coach",
|
||||
"readAloud": "Lire à voix haute",
|
||||
|
||||
+1
-1
@@ -2094,7 +2094,7 @@
|
||||
"send": "Invia",
|
||||
"stop": "Interrompi",
|
||||
"thinking": "Sto pensando…",
|
||||
"composerPlaceholder": "Chiedimi qualcosa sui tuoi dati…",
|
||||
"composerPlaceholder": "Chiedimi pure …",
|
||||
"nudgeBubbleLabel": "Nuovo messaggio dal coach — apri la chat",
|
||||
"fabLabel": "Apri il coach",
|
||||
"readAloud": "Leggi ad alta voce",
|
||||
|
||||
+1
-1
@@ -2094,7 +2094,7 @@
|
||||
"send": "Wyślij",
|
||||
"stop": "Zatrzymaj",
|
||||
"thinking": "Myślę…",
|
||||
"composerPlaceholder": "Zapytaj o swoje dane…",
|
||||
"composerPlaceholder": "Zapytaj mnie …",
|
||||
"nudgeBubbleLabel": "Nowa wiadomość od trenera — otwórz czat",
|
||||
"fabLabel": "Otwórz trenera",
|
||||
"readAloud": "Czytaj na głos",
|
||||
|
||||
@@ -49,7 +49,7 @@ describe("<CoachInput>", () => {
|
||||
const html = render(
|
||||
<CoachInput value="" onChange={() => {}} onSubmit={() => {}} />,
|
||||
);
|
||||
expect(html).toContain("Ask anything about your data");
|
||||
expect(html).toContain("Ask me anything");
|
||||
expect(html).not.toContain('data-slot="coach-input-hint"');
|
||||
expect(html).not.toContain("Press Enter to send");
|
||||
expect(html).toContain('data-slot="coach-input-send"');
|
||||
@@ -60,7 +60,7 @@ describe("<CoachInput>", () => {
|
||||
<CoachInput value="" onChange={() => {}} onSubmit={() => {}} />,
|
||||
"de",
|
||||
);
|
||||
expect(html).toContain("Frag mich etwas zu deinen Daten");
|
||||
expect(html).toContain("Frag mich etwas");
|
||||
});
|
||||
|
||||
it("disables the send button when the value is empty", () => {
|
||||
|
||||
@@ -567,6 +567,11 @@ export function CoachInput({
|
||||
// scroll regions). Scoped here, not in globals.css.
|
||||
"[scrollbar-width:thin] [scrollbar-color:color-mix(in_srgb,var(--dracula-purple)_35%,transparent)_transparent]",
|
||||
"placeholder:text-muted-foreground disabled:opacity-60",
|
||||
// Keep the placeholder a single line on narrow phones: a long
|
||||
// hint used to wrap to two lines inside the one-row composer and
|
||||
// read as a cramped block. Clip the PLACEHOLDER pseudo only — the
|
||||
// textarea value still wraps and auto-grows for real typing.
|
||||
"placeholder:overflow-hidden placeholder:text-ellipsis placeholder:whitespace-nowrap",
|
||||
)}
|
||||
/>
|
||||
{showHub ? (
|
||||
|
||||
Reference in new issue
Block a user