Skip to content

[RFC]: add help() documentation pager in REPL #2149

Closed
@Snehil-Shah

Description

@Snehil-Shah

Description

This RFC proposes adding pagination abilities to the help() text output. Help documentation can be long. Currently when executed, scrolls the terminal till the end of the documentation, the user has to then manually scroll to the beginning of the output to start reading, leading to bad UX.

I made a working prototype of the design I had in mind (attached below):

pager.1.mp4

Will make a PR once I have a clearer goal of what design are we trying to implement.

Related Issues

Related issue stdlib-js/google-summer-of-code#1

Questions

Is the design of the prototype shared above good? It allows paging in place rather than clearing the whole page (as we have with the less command). The above pager is only triggered if the help text is longer than the terminal height. I feel this is better suited for a REPL than a less type of behavior as we stay in the REPL when paging.

Other

As mentioned here, there has been prior attempts at adding a pager. Can I get some idea of the approach that was taken before to solve this, as I am not sure if my current approach is the best way to do this... Some prior context would be helpful here.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

Labels

AcceptedRFC feature request which has been accepted.EnhancementIssue or pull request for enhancing existing functionality.REPLIssue or pull request specific to the project REPL.RFCRequest for comments. Feature requests and proposed changes.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions