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

Fix normalizing pin labels for C++ and add QuickHelp for C++ and Tabtest editors #1682

Merged
merged 3 commits into from
Feb 14, 2019

Conversation

brusherru
Copy link
Contributor

It fixes #1664
Also, it adds a new feature: QuickHelp now contains a list of inputs/outputs available in the C++ editor and in the tabtest editor. Also, it contains a link to a full reference in our docs.

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

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

A general note. I recommend to avoid mixing two concepts: pin name normalization (converting empty labels to IN1, IN2, OUT, etc) and C++ escaping (getting rid of invalid C++ chars). They should be named accordingly and used in a pipe where necessary.

packages/xod-client/src/editor/components/CppPatchDocs.jsx Outdated Show resolved Hide resolved
packages/xod-project/src/pin.js Outdated Show resolved Hide resolved
packages/xod-project/src/pin.js Outdated Show resolved Hide resolved
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

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

Huh. One more time. The escape functions are quite generic to be unbound from the pin/project concept.

  • cppEscape and unicodeCharsToUnicodeSequence should be in xod-func-tools, not in xod-project
  • Changes in *.re* should reflect this as well

packages/xod-tabtest/src/Tabtest.re Outdated Show resolved Hide resolved
packages/xod-project/src/pin.js Outdated Show resolved Hide resolved
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

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

🐛

Steps to reproduce

  1. Open xod/math/clip
  2. Change the label of X to X°-§
  3. Open its not-implemented-in-xod
  4. Open Quick Help

Expected behavior

  • The quickhelp lists the input escaped: input_XUxxxx_Uxxxx

Actual behavior

  • The input is listed as X°_§ (only the hyphen is transformed)

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

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

👍 👍 👍 Now excellent

Copy link
Contributor

@evgenykochetkov evgenykochetkov left a comment

Choose a reason for hiding this comment

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

LGTM

@brusherru brusherru merged commit af2f7d3 into master Feb 14, 2019
@brusherru brusherru deleted the fix-1664-tabtest-pin-names branch February 14, 2019 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tabtests transpile pin names with - (dash) instead of _ (underscore)
3 participants