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

Cleanup for previous #2436

Merged
merged 5 commits into from
May 3, 2019
Merged

Conversation

alschmiedt
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Proposed Changes

  1. Fixes previous for field and input
  2. Output can't have a previous connection
  3. Adds checks for non null connections on block and previous.

Reason for Changes

Test Coverage

Tests written in mocha.

Tested on:

Additional Information

@alschmiedt
Copy link
Contributor Author

Current failing mocha tests were failing from before. Will fix them in a different PR.

core/ast_node.js Outdated
* @param {Blockly.Input} parentInput Parent input of the connection or field.
* Given an input find the previous editable field or an input with a non null
* connection in the same block.
* @param {!Blockly.Input} location Current location in the ast.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Phrasing: AST nodes are locations in the AST, but I don't think an input is.

Copy link
Contributor

Choose a reason for hiding this comment

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

Eh, it's not the node itself, but it does uniquely identify a position in the AST.

Copy link
Contributor

@RoboErikG RoboErikG left a comment

Choose a reason for hiding this comment

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

This looks good to me. It might be worth a followup to unify or pull out a common helper for the input and field prev/next methods. They share a lot of code and we might want to tweak aspects of it in the future.

core/ast_node.js Outdated
* @param {Blockly.Input} parentInput Parent input of the connection or field.
* Given an input find the previous editable field or an input with a non null
* connection in the same block.
* @param {!Blockly.Input} location Current location in the ast.
Copy link
Contributor

Choose a reason for hiding this comment

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

Eh, it's not the node itself, but it does uniquely identify a position in the AST.

@alschmiedt alschmiedt merged commit 04084dd into google:keyboard_nav May 3, 2019
@alschmiedt alschmiedt deleted the prev_cleanup branch May 29, 2020 15:36
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.

None yet

3 participants