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

Add a marker that shows where the user has marked on the workspace #2419

Merged

Conversation

rachel-fenichel
Copy link
Collaborator

The basics

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

The details

Resolves

Progress on keyboard navigation.

Proposed Changes

Add a marker to the workspace as well as the cursor. A marker is a type of cursorSvg that cannot be moved with prev/next/in/out. It can only be moved directly to known locations with setLocation.

When the user hits enter to mark a location on the workspace or a connection on a block, the marker renders. It disappears again when the user inserts a block at that marker.

Reason for Changes

It's important to know where your insertion location is when you're inserting blocks.

Test Coverage

Tested in Chrome

var position = markedNode.getWsCoordinate();
newBlock.moveTo(position);

// Move the cursor toe the right place on the inserted block.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: to vs toe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -297,6 +313,10 @@ Blockly.Navigation.insertFromFlyout = function() {
//TODO: IF this is null then we need to add to the correct place on the
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this TODO since I think it is taken care of in insertBlockToWs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@rachel-fenichel rachel-fenichel merged commit e9c99bf into google:keyboard_nav Apr 29, 2019
@rachel-fenichel rachel-fenichel deleted the feature/marker_cursor branch April 29, 2019 21:41
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

2 participants