Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): draw chat bubble edges under forced colours
Yudhi Armyndharis1855cbc7dba8
diff --git a/dashboard/src/pages/Chats.css b/dashboard/src/pages/Chats.cssindex f517c18eb..d4f0ec1ae 100644--- a/dashboard/src/pages/Chats.css+++ b/dashboard/src/pages/Chats.css@@ -2190,6 +2190,14 @@background: var(--chat-bubble-out);}+/* Forced colours paint every bubble in the page colour and drop its shadow, which ran one message into the next on+ the wallpaper: each bubble draws its edge instead. */+@media (forced-colors: active) {+ .chats-page .message-bubble {+ border: 1px solid CanvasText;+ }+}+/* The tail on the first bubble of a run, on the side the bubble comes from. */.chats-page .run-start .message-bubble.incoming {border-start-start-radius: 0;diff --git a/dashboard/src/pages/Chats.css.test.ts b/dashboard/src/pages/Chats.css.test.tsindex 64c3ecceb..276135a41 100644--- a/dashboard/src/pages/Chats.css.test.ts+++ b/dashboard/src/pages/Chats.css.test.ts@@ -146,3 +146,10 @@ test('the band that swaps the panes beside the expanded navigation has no lowerassert.doesNotMatch(band[1], /min-width/);assert.match(band[1], /max-width:\s*889px/);});++test('forced colours draw an edge around every message bubble, whose fill and shadow they drop', () => {+ // The bubbles have no border of their own: under forced colours each one was the page colour on the page colour.+ assert.doesNotMatch(rulesFor('.chats-page .message-bubble')[0], /(?:^|;)\s*border:/);+ const forced = [...css.matchAll(/@media \(forced-colors: active\)\s*\{([\s\S]*?)\n\}/g)].map(m => m[1]).join('\n');+ assert.match(forced, /\.chats-page \.message-bubble\s*\{[^}]*border:\s*1px solid CanvasText/);+});