Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

zapier convert: Handle empty and multi-line field help text #179

Merged
merged 3 commits into from
Nov 10, 2017

Conversation

eliangcs
Copy link
Member

@eliangcs eliangcs commented Nov 10, 2017

Fixes two issues with field help text:

  1. Don't pad help text if it's too short. Keep empty help text empty.
  2. Escape line breaks in help text so that it doesn't break the template.

Copy link
Contributor

@BrunoBernardino BrunoBernardino left a comment

Choose a reason for hiding this comment

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

This looks great, simple, and with tests!

I have a question, and will approve/request changes based on the answer.

@@ -97,14 +109,14 @@ describe('convert render functions', () => {
type: 'string',
required: true,
label: 'Username',
helpText: '(help text must be at least 10 characters)'
helpText: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this pass zapier validate ? I was initially thinking we didn't add the property at all, but if this still passes validation, I'm ok with it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch! It does not pass zapier validate. Fixed in 01995e7.

Copy link
Contributor

@BrunoBernardino BrunoBernardino left a comment

Choose a reason for hiding this comment

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

Looks awesome!

@BrunoBernardino BrunoBernardino merged commit 06ae936 into master Nov 10, 2017
@BrunoBernardino BrunoBernardino deleted the multiline-help-text branch November 10, 2017 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants