-
Notifications
You must be signed in to change notification settings - Fork 119
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
Detect pin name clashes #1356
Detect pin name clashes #1356
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for the refactoring ➕
Minus for attention 😛
It’s important to check normalized pin labels to make sure the scenarios when an input takes an auto-generated name IN3 and manually named output IN3 are not possible.
Try to put an input pulse and an output pulse. Give the output label IN
. It should cause the error, but it is not.
packages/xod-project/src/project.js
Outdated
* @param {Project} project | ||
* @returns {Either<Error|Patch>} | ||
*/ | ||
// TODO: Try to simplify this mess :-D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’ve simplified the mess 👍 I think this comment should go.
packages/xod-project/src/messages.js
Outdated
CLASHING_PIN_LABELS: ({ label, pinKeys, trace }) => ({ | ||
title: 'Clashing pin names', | ||
note: `${pinKeys.length} pins are named ${label}`, | ||
solution: 'Give pins unique names', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give the pins
1a3d1f4
to
a630e79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed the UX in #1362
What for the essence of this PR I think it is complete 👍
a630e79
to
4966ff7
Compare
…tches and nodes that cause errors themselves
…labels, rename to normalizeEmptyPinLabels
4966ff7
to
37d3b25
Compare
Closes #1337
Plus a tiny bit of refactoring in
xod-client
'sproject
selectors.