Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Allow break to the next/previous visual row on right/left arrow key. #2146

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

adoroshk
Copy link
Contributor

@adoroshk adoroshk commented Apr 24, 2024

Summary

This PR changes compact interactive list right/left arrow keys navigation to allow break to the next/previous visual row.

Previously, when navigation across the compact interactive list with Arrow Right/Left, it would stop at the end/beginning of the visual row. That has been changed so that once the end/start of the visual row is reached, the focus wraps to the next/previous row.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

This PR resolves:

UXPLATFORM-10339

* @param {number} row - an index of the currently focused semantic row.
* @returns - the index of the last semantic row in the same visual row as currently focused row.
*/
const getLastSemanticRowIndexInVisualRow = (rowsLength, numberOfColumns, flowHorizontally, row) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality wasn't added in this change, it existed before. I just had to move it up in order to use in another method.

@adoroshk adoroshk requested review from a team and eawww April 24, 2024 19:49
Copy link
Contributor

@eawww eawww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks out based on reqs

@github-actions github-actions bot temporarily deployed to preview-pr-2146 April 25, 2024 14:33 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2146 April 25, 2024 16:56 Destroyed
@adoroshk adoroshk merged commit 05f7d4f into main Apr 25, 2024
22 checks passed
@adoroshk adoroshk deleted the cil-keyboard-navigation branch April 25, 2024 17:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants