Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): mirror the contact panel toggle icon in RTL
Yudhi Armyndharis7b42d94f2cff
diff --git a/dashboard/src/index.css b/dashboard/src/index.cssindex 35d8e56bf..641cad8a4 100644--- a/dashboard/src/index.css+++ b/dashboard/src/index.css@@ -467,14 +467,16 @@ code {background-position: left 0.75rem center;}-/* Glyphs that point along the reading direction flip with it. The sidebar chevron is swapped in- Layout.tsx instead, so it is not listed here. */+/* Glyphs that point along the reading direction flip with it, and so does the chat page's contact panel toggle,+ whose panel opens on the inline end. The sidebar's panel icons are swapped in Layout.tsx instead, so they are not+ listed here. */[dir='rtl'] .lucide-arrow-left,[dir='rtl'] .lucide-arrow-right,[dir='rtl'] .lucide-corner-up-left,[dir='rtl'] .lucide-corner-up-right,[dir='rtl'] .lucide-log-in,[dir='rtl'] .lucide-log-out,+[dir='rtl'] .lucide-panel-right,[dir='rtl'] .lucide-send {transform: scaleX(-1);}diff --git a/dashboard/src/rtl-icons.test.ts b/dashboard/src/rtl-icons.test.tsindex 31293ee3b..81888c2e0 100644--- a/dashboard/src/rtl-icons.test.ts+++ b/dashboard/src/rtl-icons.test.ts@@ -5,14 +5,15 @@ import { fileURLToPath } from 'node:url';import { dirname, join } from 'node:path';import { createElement } from 'react';import { renderToStaticMarkup } from 'react-dom/server';-import { ArrowLeft, ArrowRight, CornerUpLeft, CornerUpRight, LogIn, LogOut, Send } from 'lucide-react';+import { ArrowLeft, ArrowRight, CornerUpLeft, CornerUpRight, LogIn, LogOut, PanelRight, Send } from 'lucide-react';import ts from 'typescript';// A glyph that points along the reading direction (back, send, reply, sign out) has to flip with it:// under <html dir="rtl"> the back arrow of a single pane chat still pointed left, away from the list it// returns to, and the paper plane still pointed at the text it was sent from. lucide-react marks each-// icon with a `lucide-<name>` class, which index.css uses to mirror them in one place. (The sidebar-// chevron is swapped by Layout.tsx instead and is not part of this rule.)+// icon with a `lucide-<name>` class, which index.css uses to mirror them in one place. A panel icon points at the+// side its panel opens on, the inline end for the chat page's contact panel, so it flips too. (The sidebar's panel+// icons are swapped by Layout.tsx instead and are not part of this rule.)const SRC = dirname(fileURLToPath(import.meta.url));const DIRECTIONAL = {@@ -22,6 +23,7 @@ const DIRECTIONAL = {CornerUpRight,LogIn,LogOut,+ PanelRight,Send,} as const;const kebab = (name: string): string => name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();