bug: navigating up and down in the account list hides parts of the accounts list
chocolateofpain opened this issue · 3 comments
Node.js version
v16.17.0
NPM version
8.15.0
@checkly/cli version
checkly/4.0.3 darwin-arm64 node-v16.17.0
Steps to reproduce
- In the terminal enter
npx checkly switch
. The list of account linked to the user is shown. - Navigate from one account to the next on the list using arrow keys.
- If there are more than 2 accounts the list is suddenly hidden when navigating to the third account on the list.
What is expected?
The full list of account show be visible at all times.
What is actually happening?
The list is fully hidden when the user is navigating to the third list item.
Any additional comments?
No response
@clample , I was trying to reproduce the issue but I wasn't able. I posted the screen-cast just in case it helps.
@nahuelon to reproduce it, I needed to add more accounts (~9 accounts).
Rather than needing to actually create the extra accounts, you can also add some hardcoded strings here:
checkly-cli/packages/cli/src/commands/switch.ts
Lines 45 to 52 in c25d75a
I think that there might be a bug in our version of inquirer
. We can't easily upgrade inquirer
, though, since later versions are ES Modules. We might need to find a way to support ES Module dependencies, but in a way that's not a breaking change for any users.
@clample @nahuelon we could migrate to https://www.npmjs.com/package/prompts as we use that in create-cli
. It's a bit nicer also than inquirer.