Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving TerminalMenus #48381

Open
tecosaur opened this issue Jan 23, 2023 · 10 comments
Open

Improving TerminalMenus #48381

tecosaur opened this issue Jan 23, 2023 · 10 comments
Labels
REPL Julia's REPL (Read Eval Print Loop)

Comments

@tecosaur
Copy link
Contributor

tecosaur commented Jan 23, 2023

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
Copy link
Member

timholy commented Jan 23, 2023

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
Copy link
Contributor Author

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
Copy link
Member

timholy commented Jan 23, 2023

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
Copy link
Contributor Author

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

@jakobnissen
Copy link
Contributor

Also see #44012.

@JoshuaLampert
Copy link

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

@tecosaur
Copy link
Contributor Author

tecosaur commented Jan 6, 2024

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
Copy link
Contributor Author

tecosaur commented Feb 4, 2024

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
Copy link
Contributor Author

tecosaur commented Feb 4, 2024

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
Copy link
Contributor Author

tecosaur commented Feb 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

5 participants