Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(menu): enable numpad arrow and Enter keys #4488

Closed
wants to merge 4 commits into from

Conversation

nikkimk
Copy link
Contributor

@nikkimk nikkimk commented May 23, 2024

Description

Handles keydown event by event.key instead of event.code so that numpad keys will work with menu.

Related issue(s)

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

@nikkimk nikkimk changed the title Nikkimk/3751 bug sp menu numpad fix(menu): enable numpad arrow and Enter keys May 23, 2024
Copy link

Branch preview

Visual regression test results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Copy link

github-actions bot commented May 23, 2024

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.95 0.99
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 221.147 kB 210.075 kB 🏆 210.506 kB
Scripts 53.39 kB 47.963 kB 🏆 48.125 kB
Stylesheet 34.663 kB 30.332 kB 🏆 30.489 kB
Document 5.91 kB 5.185 kB 🏆 5.19 kB
Font 127.184 kB 126.595 kB 🏆 126.702 kB

Request Count

Category Latest Main Branch
Total 45 45 45
Scripts 37 37 37
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

Copy link

github-actions bot commented May 23, 2024

Tachometer results

Chrome

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 131.10ms - 134.17ms - faster ✔
5% - 8%
7.27ms - 11.70ms
branch 634 kB 140.52ms - 143.71ms slower ❌
5% - 9%
7.27ms - 11.70ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 60.56ms - 61.60ms - faster ✔
5% - 8%
3.53ms - 5.30ms
branch 591 kB 64.78ms - 66.22ms slower ❌
6% - 9%
3.53ms - 5.30ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 58.49ms - 59.57ms - faster ✔
6% - 9%
3.84ms - 5.86ms
branch 590 kB 63.03ms - 64.73ms slower ❌
6% - 10%
3.84ms - 5.86ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1872.15ms - 1874.83ms - unsure 🔍
-0% - +0%
-2.70ms - +1.54ms
branch 777 kB 1872.42ms - 1875.72ms unsure 🔍
-0% - +0%
-1.54ms - +2.70ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1858.45ms - 1861.41ms - unsure 🔍
-0% - +0%
-2.62ms - +2.14ms
branch 775 kB 1858.31ms - 1862.04ms unsure 🔍
-0% - +0%
-2.14ms - +2.62ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 35.55ms - 36.88ms - faster ✔
3% - 7%
1.03ms - 2.51ms
branch 697 kB 37.65ms - 38.32ms slower ❌
3% - 7%
1.03ms - 2.51ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 395.46ms - 401.66ms - faster ✔
2% - 4%
8.37ms - 18.30ms
branch 697 kB 408.02ms - 415.77ms slower ❌
2% - 5%
8.37ms - 18.30ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 212.24ms - 215.47ms - faster ✔
2% - 4%
4.52ms - 9.27ms
branch 463 kB 219.01ms - 222.48ms slower ❌
2% - 4%
4.52ms - 9.27ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 530.69ms - 544.24ms - faster ✔
1% - 5%
6.18ms - 25.44ms
branch 500 kB 546.43ms - 560.12ms slower ❌
1% - 5%
6.18ms - 25.44ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1857.94ms - 1861.75ms - unsure 🔍
-0% - +0%
-2.29ms - +3.05ms
branch 710 kB 1857.59ms - 1861.34ms unsure 🔍
-0% - +0%
-3.05ms - +2.29ms
-
Firefox

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 273.91ms - 280.05ms - faster ✔
11% - 14%
34.68ms - 42.92ms
branch 634 kB 313.02ms - 318.54ms slower ❌
12% - 16%
34.68ms - 42.92ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 127.86ms - 129.74ms - faster ✔
1% - 3%
1.60ms - 3.84ms
branch 591 kB 130.93ms - 132.11ms slower ❌
1% - 3%
1.60ms - 3.84ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 154.82ms - 160.34ms - slower ❌
10% - 15%
13.58ms - 20.70ms
branch 590 kB 138.19ms - 142.69ms faster ✔
9% - 13%
13.58ms - 20.70ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1914.42ms - 1923.10ms - slower ❌
1% - 2%
26.79ms - 36.21ms
branch 777 kB 1885.43ms - 1889.09ms faster ✔
1% - 2%
26.79ms - 36.21ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1882.21ms - 1886.87ms - unsure 🔍
-0% - +0%
-2.41ms - +4.33ms
branch 775 kB 1881.15ms - 1886.01ms unsure 🔍
-0% - +0%
-4.33ms - +2.41ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 61.72ms - 65.80ms - unsure 🔍
-1% - +6%
-0.82ms - +3.78ms
branch 697 kB 61.22ms - 63.34ms unsure 🔍
-6% - +1%
-3.78ms - +0.82ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 726.48ms - 737.84ms - slower ❌
0% - 4%
1.52ms - 27.76ms
branch 697 kB 705.69ms - 729.35ms faster ✔
0% - 4%
1.52ms - 27.76ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 425.21ms - 438.59ms - faster ✔
1% - 6%
5.20ms - 25.92ms
branch 463 kB 439.55ms - 455.37ms slower ❌
1% - 6%
5.20ms - 25.92ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 1004.49ms - 1034.19ms - faster ✔
3% - 6%
34.81ms - 66.43ms
branch 500 kB 1064.55ms - 1075.37ms slower ❌
3% - 7%
34.81ms - 66.43ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1874.75ms - 1879.61ms - unsure 🔍
-0% - +0%
-3.15ms - +4.39ms
branch 710 kB 1873.68ms - 1879.44ms unsure 🔍
-0% - +0%
-4.39ms - +3.15ms
-

@nikkimk nikkimk closed this May 23, 2024
@nikkimk nikkimk deleted the nikkimk/3751-bug-sp-menu-numpad branch May 23, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: sp-menu does not honor Numpad keys for Arrow ⬆️ ⬇️ and Enter
1 participant