Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shortcuts: Improve styling of search rows, and add text accelerator s…
…upport This CL does two major things: 1) it updates the styling of search rows in the Shortcuts app to match the spec. 2) it adds support for text accelerators to be rendered as a search result. This CL moves some code around in accelerator_row.ts and text_accelerator.ts so that the TextAcceleratorElement owns the function getTextAcceleratorParts. This is because SearchResultRow also uses that function now. This CL also adds two new properties to both TextAcceleratorElement and InputKeyElement: `narrow` and `highlighted`. `narrow` is used in the SearchResultRow to reduce the space between keys, per the spec. `highlighted` is also used in the SearchResultRow, and is toggled on when a row is selected. See the latter two screenshots for examples. This CL also adds tests for the text accelerator support. Screenshots: New arrow icon, and blank shortcuts for standard accelerators (for now): https://screenshot.googleplex.com/6oqBQvHersBfL5K.png Text accelerators rendering correctly: https://screenshot.googleplex.com/4affhxcsL338o6Z.png Selected row with highlighted keys: https://screenshot.googleplex.com/4YTPNvxdTd7Lrnu.png Difference between hover and selection https://screenshot.googleplex.com/AgHAPL3DCCdQ8f3.png Test: browser_tests gtest_filter=ShortcutCustomizationAppSearch* Bug: b:266085562 Change-Id: I537d832f9e98db4a95c497f241ddeaccae3c4e85 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4366363 Commit-Queue: Camden Bickel <cambickel@google.com> Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org> Cr-Commit-Position: refs/heads/main@{#1122557}
- Loading branch information
Cam Bickel
authored and
Chromium LUCI CQ
committed
Mar 27, 2023
1 parent
f09d209
commit 7739cd1
Showing
10 changed files
with
208 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.