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

Customize inputhint of prompt property #3196

Merged
merged 3 commits into from
Jan 20, 2021
Merged

Customize inputhint of prompt property #3196

merged 3 commits into from
Jan 20, 2021

Conversation

Danieladu
Copy link
Contributor

Fixes #3195

Description

Using expectingInput while inputHint property is not assigned of prompt property in InputDialog. Otherwise, keep it as it is.

@Danieladu Danieladu requested review from a team as code owners January 18, 2021 02:50
@Danieladu Danieladu requested review from chrimc62 and tomlm January 18, 2021 02:50
@coveralls
Copy link

coveralls commented Jan 18, 2021

Pull Request Test Coverage Report for Build 492599783

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 14 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 84.49%

Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-dialogs-adaptive/src/input/inputDialog.ts 14 83.16%
Totals Coverage Status
Change from base Build 486704763: 0.1%
Covered Lines: 17815
Relevant Lines: 20143

💛 - Coveralls

Copy link
Contributor

@joshgummersall joshgummersall left a comment

Choose a reason for hiding this comment

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

Small possible suggestion, otherwise LGTM.

@@ -359,7 +359,9 @@ export abstract class InputDialog extends Dialog implements InputDialogConfigura
msg = await this.prompt.bind(dc, dc.state);
}

msg.inputHint = InputHints.ExpectingInput;
if (typeof msg?.inputHint !== 'string' || !msg.inputHint) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if (typeof msg?.inputHint !== 'string') should cover all the cases, unless msg.inputHint = '' should be overridden to InputHints.ExpectingInput.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. Empty inputHint should be overridden to the default ExpectingInput. Thanks.

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.

Can not customize inputhint of prompt property in InputDialog
3 participants