8000 feat: add loopback in cursor navigation, and add tests by rachel-fenichel · Pull Request #8883 · google/blockly · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add loopback in cursor navigation, and add tests #8883

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

Merged
merged 6 commits into from
Apr 14, 2025

Conversation

rachel-fenichel
Copy link
Collaborator

The basics

The details

Resolves

Progress on google/blockly-keyboard-experimentation#409

Proposed Changes

  • Add a loop parameter to getPreviousNode and getNextNode in cursor.
  • Add tests for loopback and non loopback cases.

Reason for Changes

Both navigation and keyboard drags will use this to smoothly roll from the end of the workspace to the beginning and vice versa, matching standard approaches to searching.

Test Coverage

Added tests in cursor_test.ts.

Documentation

Additional Information

I got some unexpected (to me) behaviour in getPreviousNode but they turned out to be unexpected stack nodes. Getting rid of stack nodes is being considered already, and will require updates to these tests.

The fourth commit inlines some logic in functions in line_cursor.ts, but I can revert it if necessary.

@rachel-fenichel rachel-fenichel requested a review from a team as a code owner April 12, 2025 00:13
@rachel-fenichel rachel-fenichel changed the title Loop in next feat: add loopback in cursor navigation, and add tests Apr 12, 2025
@rachel-fenichel rachel-fenichel requested review from gonfunko and removed request for maribethb April 12, 2025 00:13
@rachel-fenichel rachel-fenichel added the PR: feature Adds a feature label Apr 12, 2025
@rachel-fenichel rachel-fenichel merged commit fac7504 into google:rc/v12.0.0 Apr 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0