Skip to content

Allow edit target when source and target share the same parent node. #71

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 4 commits into from
Mar 12, 2019

Conversation

benloh
Copy link
Collaborator

@benloh benloh commented Mar 12, 2019

This addresses Issues #68 and #70.

When the source and target nodes both point to the parent node, they cannot be edited. We generally do not enable editing of an edge source/target if it points to the parent node, but this is a special case where that limit means the student would be stuck unable to edit the edge.

The agreed up on solution was to enable editing of only the target node in this situation.

To Test

  1. Create an edge where both the source and target point to the parent node and save it.
  2. Select the edge again and click on "Edit Edge"
  3. The target node should display a "Change Target" button and you should be able to change it.

NOTE

This also addresses a related bug discussed in Issue #70 with SELECTION events. Summary: AutoComplete onBlur events would cause NodeSelector to load the Source or Target node that you were trying to change, instead of allowing a click on the graph to select a new Source or Target replacement. The solution required a combination of having NodeSelector ignore the SELECTION event when an edge was being edited, and when the user clicks on "Change Source" or "Change Target", replace the Source or Target node label in the Source/Target AutoComplete filed with an empty string so that the onBlur would not match the previously selected node.

This is a significant enough change that we probably should do a fair amount of testing to make sure we haven't introduced other odd states.

benloh added 4 commits March 8, 2019 16:54
…rce/target selection via click during edge edit from triggering a node selection.
… target edge, and restore onBlur to allow keyboard selection.
@benloh benloh requested review from jdanish and kalanicraig March 12, 2019 04:05
@benloh benloh merged commit f530fb0 into dev-bl/template-select Mar 12, 2019
@benloh benloh deleted the dev-bl/edit-source-target branch May 2, 2019 20:37
benloh pushed a commit that referenced this pull request Jan 8, 2024
Technical Debt Reduction: Fix Code Formatting and Lint Errors
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.

1 participant