From 7b2e860018be5c221db3b321038128725322e70f Mon Sep 17 00:00:00 2001 From: YuhanYang Date: Fri, 17 Mar 2023 19:17:47 +0000 Subject: [PATCH] Settings Split: Use DeepLinkingMixin on per device pages Set auto focus on the element when directed from existing search tags. Tested on VM, and browser_tests Bug: b/241965700 Change-Id: I0a9997f7c6778b57ea4470ae3e0035f9f3a4c8f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4335985 Commit-Queue: Yuhan Yang Reviewed-by: David Padlipsky Cr-Commit-Position: refs/heads/main@{#1118810} --- .../per_device_keyboard_subsection.ts | 2 +- .../device_page/per_device_mouse.html | 6 ++- .../per_device_mouse_subsection.html | 15 ++++-- .../per_device_mouse_subsection.ts | 42 ++++++++++++++- .../per_device_pointing_stick.html | 6 ++- .../per_device_pointing_stick_subsection.ts | 38 ++++++++++++- .../device_page/per_device_touchpad.html | 6 ++- .../per_device_touchpad_subsection.html | 25 ++++++--- .../per_device_touchpad_subsection.ts | 43 ++++++++++++++- .../chromeos/os_settings_v3_browsertest.js | 13 +++-- .../per_device_mouse_subsection_test.js | 52 +++++++++++++++++- ...r_device_pointing_stick_subsection_test.js | 52 +++++++++++++++++- .../per_device_touchpad_subsection_test.js | 53 ++++++++++++++++++- 13 files changed, 319 insertions(+), 34 deletions(-) diff --git a/chrome/browser/resources/settings/chromeos/device_page/per_device_keyboard_subsection.ts b/chrome/browser/resources/settings/chromeos/device_page/per_device_keyboard_subsection.ts index de2782e1f1e32..c4ced0d2d5771 100644 --- a/chrome/browser/resources/settings/chromeos/device_page/per_device_keyboard_subsection.ts +++ b/chrome/browser/resources/settings/chromeos/device_page/per_device_keyboard_subsection.ts @@ -174,7 +174,7 @@ export class SettingsPerDeviceKeyboardSubsectionElement extends return; } - // If there is more than one keyboard, focus on the first one. + // If multiple keyboards are available, focus on the first one. if (this.keyboardIndex === 0) { this.attemptDeepLink(); } diff --git a/chrome/browser/resources/settings/chromeos/device_page/per_device_mouse.html b/chrome/browser/resources/settings/chromeos/device_page/per_device_mouse.html index 8a213e3fcb954..bb499f59d7326 100644 --- a/chrome/browser/resources/settings/chromeos/device_page/per_device_mouse.html +++ b/chrome/browser/resources/settings/chromeos/device_page/per_device_mouse.html @@ -1,4 +1,6 @@ -