It would be nice to override the default pageSize (7).
I'm really trying to limit any bloat or extra unnecessary feature out of Inquirer. And I feel setting page size is such a bloat.
As I see it, there's no case where an author need to setup a different page size per prompt.
I tested different size, and I felt 7 choices was the right one as it offered enough choices in one look, without overloading the prompt with text. I considered a moment basing the choices number on the prompt height, but that would've made huge lists (who're not super user friendly).
Note that I'm open to discussion so I keep it open hoping some other people are willing to chip in their opinion. (cc @danielchatfield @robwierzbowski)
How about the ability to override the pageSize globally?
IMO this is a good place for decisions and consistency over options. Ideally you could read the height of the terminal and set the pageSize to 7 or 50% of the terminal window, whichever is larger, but barring that a single number seems best to me.
I think 7 is a good number, we could create APIs for every little thing but that would just turn inquirer into a bloated mess. I can't think of a situation where a developer would _need_ to override it.
"I can't think of a situation where a developer would need to override it."
How about... when a developer wants a pageSize more than 7... when traversing to look at the eight item is unacceptable.
This is not a slippery slope into "[creating] AIPs for every little thing", or into a "bloated mess." This is a simple request.
I don't really like this, but we can see what @SBoudrias thinks.
We could add inquirer.Choices = require("./objects/choices"); to the client interfaces which would then let a client library disable the pagination by monkey patching it:
"use strict";
var inquirer = require("inquirer");
inquirer.Choices.prototype.setRender = function( render ) {
this.renderingMethod = render;
};
I think most agree this is unnecessary measure, so I'll close the request.
@danielchatfield Exposing Choices could work, so feel free to send a PR. Although, it should be noted monkey patching would work now, but it won't get documented and could break in any future release.
Most helpful comment
How about... when a developer wants a pageSize more than 7... when traversing to look at the eight item is unacceptable.
This is not a slippery slope into "[creating] AIPs for every little thing", or into a "bloated mess." This is a simple request.