Widget: match the chat bubble color to the rest of the widget
@sethr07 ci sta già lavorando.
Dal 23/11/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- css, javascript, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia da createStyles in public/widget.js, dove le regole di #cp-widget-bubble fissano l'indaco #4f46e5 e le sue ombre rgba(79,70,229,...). Sostituiscile con una costante di colore con nome vicino a BUBBLE_SIZE, impostata su #2563eb, e ricava entrambe le ombre da essa con le stesse opacità. Poi aggiungi un test in tests/unit/ modellato su widget-surface-hardening.test.ts che verifichi il nuovo valore e l'assenza del vecchio indaco. Il lavoro è completo quando il test passa, pnpm test e pnpm build vanno a buon fine e l'anello di focus è visibile su una pagina di test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DeadantCo/answerLoopsdev
-
Widget: make the chat window fit on small phonesForse già presa @sethr07 l’ha presa oggi. Apertaenhancement frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
DeadantCo/answerLoopsdev#67 · 9 commenti ·
-
Add 'select all' option to Slack channel picker in SettingsForse già presa @sethr07 l’ha presa oggi. Apertafrontend good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DeadantCo/answerLoopsdev#22 · 5 commenti ·
-
enhancement frontend help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
DeadantCo/answerLoopsdev#140 ·
-
backend enhancement frontend help wanted notifications
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
DeadantCo/answerLoopsdev#139 ·
Tutte le issue di DeadantCo/answerLoopsdev
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
lingdojo/kana-dojo#34545 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Blocklist addition requestApertablocklist addition
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
MetaMask/eth-phishing-detect#315455 ·
I maintainer di solito rispondono entro 1 giorno
-
area: telegram bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
griffinwork40/agent-afk#5275 ·
I maintainer di solito rispondono entro 1 giorno
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getopenscreen/openscreen#1667 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
erkamyaman/rust-anything#371 ·
I maintainer di solito rispondono entro 1 giorno