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

[Autocomplete] add scrollContentTo method and automatically scroll items when using keyboard #11152

Closed
2 of 5 tasks
driskull opened this issue Dec 27, 2024 · 5 comments
Closed
2 of 5 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@driskull
Copy link
Member

Check existing issues

Description

  • add scrollContentTo method
  • automatically scroll items when using keyboard (arrow keys/home/end)

Acceptance Criteria

  • add scrollContentTo method
  • automatically scroll items when using keyboard (arrow keys/home/end)

Relevant Info

No response

Which Component

autocomplete

Example Use Case

https://codepen.io/Matt-Driscoll/pen/OPLjzXX?editors=1010

  1. open component
  2. use arrow key down to navigate items
  3. notice that it doesn't scroll when you get to the last item displayed

Priority impact

impact - p2 - want for an upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Maps SDK for JavaScript

@driskull driskull added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 27, 2024
@github-actions github-actions bot added ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Dec 27, 2024
@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. p - medium Issue is non core or affecting less that 60% of people using the library estimate - 3 A day or two of work, likely requires updates to tests. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 28, 2024
driskull added a commit that referenced this issue Dec 31, 2024
…ll when navigating items via keyboard (#11153)

**Related Issue:** #11152

## Summary

- add `scrollContentTo` method
- add test
- automatically scroll to items when using keyboard

BEGIN_COMMIT_OVERRIDE
END_COMMIT_OVERRIDE
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jan 6, 2025
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned driskull Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Installed and assigned for verification.

@geospatialem
Copy link
Member

The fix doesn't appear to work across Windows browsers (Chrome, FF, and Edge) when trying to navigate to the last autocomplete-item via the down arrow and End keys with https://codepen.io/geospatialem/pen/raBpzmm. Wondering if there's some specific logic that addresses the functionality for Mac/Mac browsers, but not Windows/Windows browsers?

Reassigning to further diagnose.

@geospatialem geospatialem assigned driskull and unassigned geospatialem and DitwanP Jan 9, 2025
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jan 9, 2025
@driskull
Copy link
Member Author

driskull commented Jan 9, 2025

Wondering if there's some specific logic that addresses the functionality for Mac/Mac browsers, but not Windows/Windows browsers?

Nope, it just uses this: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

driskull added a commit that referenced this issue Jan 9, 2025
…#11242)

**Related Issue:** #11152

## Summary

- Only includes enabled items in keyboard navigation
- disabled items are ignored

BEGIN_COMMIT_OVERRIDE
omitted from changelog
END_COMMIT_OVERRIDE
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Installed and assigned for verification.

@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned driskull Jan 9, 2025
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jan 10, 2025
@geospatialem
Copy link
Member

Verified with 3.0.0-next.93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

3 participants