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 line break of subflow label on palette #2828

Merged

Conversation

HiroyasuNishiyama
Copy link
Member

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

If the label of a SUBFLOW contains a line break (\n ), the label may be displayed outside of the SUBFLOW as shown below.

スクリーンショット 2021-01-20 23 12 42

This PR attempts to fix this.

スクリーンショット 2021-01-20 23 12 07

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@coveralls
Copy link

coveralls commented Jan 20, 2021

Coverage Status

Coverage increased (+0.04%) to 68.548% when pulling 435917c on node-red-hitachi:fix-line-break-of-subflow-label into bebebaa on node-red:dev.

@knolleary
Copy link
Member

If the subflow name is ABCDEFG\n HIJKLMN then I would expect the label in the palette to be displayed as:

ABCEDFG
HIJKLMN

And not to have the \n displayed in plain text.

@HiroyasuNishiyama
Copy link
Member Author

Thank you for your advice.
I will try to fix to change \n to line break.
My concern on handling \n in a SUBFLOW template label similar to on workspace is that the node width is fixed on palette so SUBFLOW template does not get the expected line breaks.

Assuming node has width of 3 characters,

ABCD\n EFG\n HI

SUBFLOW label is displayed as follows:

ABC
D
EFG

HI

@HiroyasuNishiyama
Copy link
Member Author

Fixed to handle line break (\n ) on palette.

@knolleary knolleary merged commit 34ef055 into node-red:dev Jan 27, 2021
@HiroyasuNishiyama HiroyasuNishiyama deleted the fix-line-break-of-subflow-label branch February 12, 2021 15:20
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