JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.48k stars 5.46k forks source link

Improving TerminalMenus #48381

Open tecosaur opened 1 year ago

tecosaur commented 1 year ago

Hello,

I love the idea of REPL.TerminalMenus, however in practice I find it falling short for very basic use cases, such as prompting for a line of text or yes/no questions.

How would a PR adding a small number of basic inputs like these be received?

Furthermore, as nice a TerminalMenus is, I find other libraries to do a better job visually, for example https://github.com/charmbracelet/bubbles. I'm not suggesting Julia go beyond basic prompts/menus, however I think there are a few improvement to the visual style that could be made.

For an example of what I'd consider visually "better" prompts/menus, see this demo:

Shell running the ./demo.sh script

How would a PR tweaking the visual style of TerminalMenus be received?

timholy commented 1 year ago

IMO it would be great if someone took TerminalMenus under their wing. The biggest challenges are that (1) changes have to be made without breaking backward compatibility, and (2) there seem to be few reviewers. I'm willing to review, with the caveat that I do sometimes get busy and have to tune out the world for a month or more. But I will come back eventually, feel free to ping me periodically if you get no response (it will not annoy me).

tecosaur commented 1 year ago

Ok, I might spin up a "make TerminalMenus more useful+pretty" PR then. I just wanted to make sure the effort wouldn't be wasted.

ETA: a few weeks to months.

One other question, would there be somebody I might be able to poke with questions about REPL, in particular the LineEdit system?

timholy commented 1 year ago

You can certainly pose questions as comments at particular lines in PRs. But if you want them answered before submitting the PR, it might be best to poke a group rather than an individual. Perhaps #internals on slack?

tecosaur commented 1 year ago

Is slack a better place to linger with questions about development/bits of Julia itself than zulip?

jakobnissen commented 11 months ago

Also see https://github.com/JuliaLang/julia/pull/44012.

JoshuaLampert commented 8 months ago

Is there any update on this? It would be really cool to see TerminalMenus work together with StyledStrings.

tecosaur commented 8 months ago

This is still on my todo list, but there's a large chain of PRs before I get to working on it, and it currently seems to take ~2-3 months per PR merge, so this might not happen for a while.

See #50817 for more info.

tecosaur commented 7 months ago

Now that more of the StyledStrings-related PRs have been merged (there's been a wonderful recent burst of activity), I'm going to give this some more attention.

My current plan is to:

  1. Build a TerminalMenus-like module using StyledStrings and REPL, and see what I can accomplish with a fresh take using the experience I have so far from (1) using TerminalMenus previously, (2) making my own TerminalMenus-like components when they've fallen short in other packages of mine, (3) developing StyledStrings
  2. Have a closer look at TerminalMenus current code base, think about how the two might be married (how feasible does a backwards-compatible path look, etc.)
  3. Talk to other people about what the best path forward might look like

If you're interested in getting on board with (1), I'll probably have a repo up shortly (requiring a fairly recent Julia master build).

tecosaur commented 7 months ago

One complication with my impending project becoming TerminalMenus is that I'd like to actually see the "Terminal" aspect become a special case by implementing a more generic system using the display stack.

tecosaur commented 7 months ago

Zulip thread on this (join me here if you have thoughts!): #repl Developing InteractivePrompts.jl