Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): show keyboard focus on the page search boxes
Yudhi Armyndharis2b0bed7ed8d7
diff --git a/dashboard/src/pages/Chats.css b/dashboard/src/pages/Chats.cssindex ce0b357a3..a6a062b04 100644--- a/dashboard/src/pages/Chats.css+++ b/dashboard/src/pages/Chats.css@@ -124,6 +124,11 @@outline: none;}+.chats-page .chat-search-input:focus-within {+ border-color: var(--primary);+ box-shadow: 0 0 0 3px var(--primary-soft);+}+.chats-page .chats-list {flex: 1;overflow-y: auto;diff --git a/dashboard/src/pages/Logs.css b/dashboard/src/pages/Logs.cssindex 0b4afc636..b5f1647e4 100644--- a/dashboard/src/pages/Logs.css+++ b/dashboard/src/pages/Logs.css@@ -44,6 +44,11 @@outline: none;}+.logs-page .search-input:focus-within {+ border-color: var(--primary);+ box-shadow: 0 0 0 3px var(--primary-soft);+}+.logs-page .filter-group {display: flex;align-items: center;diff --git a/dashboard/src/pages/Plugins.css b/dashboard/src/pages/Plugins.cssindex e5d8fa35c..7f639d2f8 100644--- a/dashboard/src/pages/Plugins.css+++ b/dashboard/src/pages/Plugins.css@@ -1018,6 +1018,11 @@color: var(--text-primary);}+.plugins-page .catalog-search:focus-within {+ border-color: var(--primary);+ box-shadow: 0 0 0 3px var(--primary-soft);+}+.plugins-page .catalog-list {display: flex;flex-direction: column;diff --git a/dashboard/src/pages/Sessions.css b/dashboard/src/pages/Sessions.cssindex 1b1e58574..1725497b2 100644--- a/dashboard/src/pages/Sessions.css+++ b/dashboard/src/pages/Sessions.css@@ -46,6 +46,11 @@outline: none;}+.sessions-page .search-input:focus-within {+ border-color: var(--primary);+ box-shadow: 0 0 0 3px var(--primary-soft);+}+.sessions-page .filter-group {display: flex;align-items: center;diff --git a/dashboard/src/pages/Templates.css b/dashboard/src/pages/Templates.cssindex bf13e8503..d1c077532 100644--- a/dashboard/src/pages/Templates.css+++ b/dashboard/src/pages/Templates.css@@ -114,6 +114,11 @@font-size: 0.875rem;}+.templates-page .templates-search:focus-within {+ border-color: var(--primary);+ box-shadow: 0 0 0 3px var(--primary-soft);+}+.templates-page .template-list {display: flex;flex: 1;diff --git a/dashboard/src/styles.scope.test.ts b/dashboard/src/styles.scope.test.tsindex 975e7fb5b..954631cbb 100644--- a/dashboard/src/styles.scope.test.ts+++ b/dashboard/src/styles.scope.test.ts@@ -74,3 +74,24 @@ for (const file of files) {);});}++// A search box drops its input's own outline and draws the frame around it instead, so the frame+// has to show keyboard focus: with neither, a keyboard user cannot see the field is focused.+const SEARCH_BOXES: Record<string, string> = {+ 'Sessions.css': '.sessions-page .search-input',+ 'Logs.css': '.logs-page .search-input',+ 'Chats.css': '.chats-page .chat-search-input',+ 'Templates.css': '.templates-page .templates-search',+ 'Plugins.css': '.plugins-page .catalog-search',+};++test('every page search box shows keyboard focus on its frame', () => {+ const missing = Object.entries(SEARCH_BOXES).filter(+ ([file, box]) =>+ !selectors(stripComments(readFileSync(join(PAGES_DIR, file), 'utf8'))).includes(`${box}:focus-within`),+ );+ assert.deepEqual(+ missing.map(([file, box]) => `${file}: ${box}`),+ [],+ );+});