[FIX] Fix the hang arrow key in script type selection when the UsageDataPrompt is no needed to show
Do these changes impact User Experience? (e.g., how the user interacts with Yo Office and/or the files and folders the user sees in the project that Yo Office creates)
[x] Yes
[ ] No
When promptForUsageData is needed, the prompt show and user can select as expected. But when the promptForUsageData is no needed to show, the user's arrow key will be hang in script type selection step. After some investigation, this issue should be related to Inquirer.js (Inquirer.js is used by Yeoman) v8's when option api. This PR move the condition judge out from prompt() and fix the arrow key hang issue. This will make the ux more fluently.
[FIX] Fix the hang arrow key in script type selection when the UsageDataPrompt is no needed to show
Do these changes impact User Experience? (e.g., how the user interacts with Yo Office and/or the files and folders the user sees in the project that Yo Office creates)
When
promptForUsageData
is needed, the prompt show and user can select as expected. But when thepromptForUsageData
is no needed to show, the user's arrow key will be hang in script type selection step. After some investigation, this issue should be related to Inquirer.js (Inquirer.js is used by Yeoman) v8'swhen
option api. This PR move the condition judge out fromprompt()
and fix the arrow key hang issue. This will make the ux more fluently.Do these changes impact documentation? (e.g., a tutorial on https://learn.microsoft.com/en-us/office/dev/add-ins/overview/office-add-ins)
Validation/testing performed:
Manual testing:
npm run build && npm link
, thenyo office
works well. Deleteoffice-addin-usage-data.json
in user's folder,yo office
works well.Platforms tested: