Widget: match the chat bubble color to the rest of the widget
@sethr07 arbeitet bereits daran.
Seit 23.11.2026.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 75/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- css, javascript, typescript
- Bereich
- frontend
Rechercherichtung
Beginne in createStyles in public/widget.js, wo die #cp-widget-bubble-Regeln das Indigo #4f46e5 und dessen rgba(79,70,229,...)-Schatten fest kodieren. Ersetze sie durch eine benannte Farbkonstante nahe BUBBLE_SIZE mit dem Wert #2563eb und leite beide Schatten daraus mit denselben Deckkraftwerten ab. Füge dann einen Test in tests/unit/ hinzu, der sich an widget-surface-hardening.test.ts orientiert und den neuen Wert sowie das Fehlen des alten Indigo prüft. Fertig ist es, wenn der Test besteht, pnpm test und pnpm build erfolgreich sind und der Fokusring auf einer Testseite sichtbar ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Copied from DeadantCo/answerLoops#58 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/345 — originally opened by
@NathanTarberton 2026-10-08
Part of the chat widget work tracked in #333.
Problem
The round button that opens the chat widget is a hard-coded indigo (#4f46e5) with an indigo shadow, while everything inside the chat window uses the app's brand blue. A visitor sees two different colors for one product. The embed script is plain JavaScript injected into customer sites, so it cannot use the app's color tokens and carries its own copy of the color.
Scope
Change the default bubble color in public/widget.js so it matches the chat window.
- Background: from
#4f46e5to the app's brand blue,brand-600(#2563eb, defined inapp/globals.css). - Shadow: the resting shadow (
rgba(79,70,229,.4)) and the stronger hover shadow (rgba(79,70,229,.5)) are built from the same indigo. Rebuild both from the new blue at the same opacities, so no indigo is left anywhere in the script. - Keep the white icon. Check it still has enough contrast on the new blue.
- Keep the button's keyboard behavior: it must still show a visible focus ring when tabbed to. Confirm this by tabbing to it on a test page, and add a focus style if the browser default is not visible on the new color.
- Keep one named constant for the color near the top of the script, next to
BUBBLE_SIZE, so the workspace brand color from #348 can replace it in one place.
Not in this issue
Letting a workspace choose its own color (#348), the bubble's size, position or side (#344, #351, #352), the open and close behavior, and the colors inside the chat window.
Acceptance criteria
- The bubble background is
#2563eband matches the chat window's brand blue. - The resting and hover shadows use the same blue, and no
79,70,229or4f46e5remains inpublic/widget.js. - The icon contrast on the new background is at least 4.5:1, and the bubble still shows a visible focus ring from the keyboard.
- The color lives in one constant that #348 can later replace.
- Size, position, hover scale and open/close behavior are unchanged.
- Checked on a real embed in a test page at desktop width and at 375px.
- A test in
tests/unit/readspublic/widget.js(aswidget-surface-hardening.test.tsdoes) and asserts the new color and the absence of the old indigo values. -
pnpm testandpnpm buildpass.
Implementation starting points
public/widget.js(createStyles, the#cp-widget-bubblerules)app/globals.css(--color-brand-600)tests/unit/widget-surface-hardening.test.ts(example of testing the script's text)
Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 0
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DeadantCo/answerLoopsdev
-
Widget: make the chat window fit on small phonesEvtl. vergeben @sethr07 hat das heute übernommen. Offenenhancement frontend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
DeadantCo/answerLoopsdev#67 · 9 Kommentare ·
-
Add 'select all' option to Slack channel picker in SettingsEvtl. vergeben @sethr07 hat das heute übernommen. Offenfrontend good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DeadantCo/answerLoopsdev#22 · 5 Kommentare ·
-
enhancement frontend help wanted
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
DeadantCo/answerLoopsdev#140 ·
-
backend enhancement frontend help wanted notifications
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
DeadantCo/answerLoopsdev#139 ·
Alle Issues in DeadantCo/answerLoopsdev
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
microsoft/playwright#44340 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
sindresorhus/eslint-plugin-unicorn#4045 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
CreadorLanda/yo#316 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
awslabs/social-messaging-agent-runtime-toolkit#232 ·
Maintainer antworten meist innerhalb von 3 Tagen