Skip to content

Merge ConsoleUI to provide interactive menusΒ #841

Closed

Description

@MTyson

I want to achieve an effect like so: https://www.npmjs.com/package/prompt-checkbox

But in Java. (C'mon Java, you can do it).

Activity

  1. mattirn commented on Apr 22, 2023

    @mattirn
    Collaborator

    Yes, you can do it also in java... See #592 and my old pull request Upgrade JLine to 3.19.0 awegmann/consoleui#24, which IMHO is working pretty well.

  2. MTyson commented on Apr 22, 2023

    @MTyson
    ContributorAuthor

    Nice, thanks. Does this attempt things like https://www.npmjs.com/package/inquirer, meaning, arrow key navigable select/multi-select?
    I've tried about half a dozen java libs and they all end up just being "menus" that select by means of typing in the option letter/num.

  3. MTyson commented on Apr 22, 2023

    @MTyson
    ContributorAuthor

    It looks like it does indeed. What is the quickest path to take from a vanilla JLine app to an app that can offer interactive menu prompts?

  4. lutzseverino commented on Apr 22, 2023

    @lutzseverino

    I'm pretty confused right now, can someone point me in the right direction on (preferably) an explanation on how to do these sorts of things? As I understand, JLine is capable of reading UP, DOWN, and such keystrokes, I just cannot for the life of me get it to work!

  5. MTyson commented on Apr 22, 2023

    @MTyson
    ContributorAuthor

    My superficial understanding is that the JLine library does not handle single keystrokes but you can add a layer that will respond that way. I think the second comment above demonstrates how to do that in the links. Still looking.

  6. MTyson commented on Apr 22, 2023

    @MTyson
    ContributorAuthor

    I'm actually writing a piece for InfoWorld on JLine, and I was hoping to include some fancy menu handling but I think I'll just go with entering text and hitting the enter key.

  7. MTyson commented on Apr 22, 2023

    @MTyson
    ContributorAuthor

    I just got to look at ConsoleUI - it does exactly what we want. Thanks @mattirn @awegmann.

  8. lutzseverino commented on Jan 18, 2024

    @lutzseverino

    So, to clear everything up: JLine doesn't provide this functionality on its own. Why did #24 never get merged?

  9. gnodet commented on Jan 18, 2024

    @gnodet
    Member

    So, to clear everything up: JLine doesn't provide this functionality on its own. Why did #24 never get merged?

    That's not for us to answer. I suppose the project is not maintained anymore... However, if there's a will and if @awegmann is ok, we could merge ConsoleUI into a new JLine module and shut down the ConsoleUI project.

  10. awegmann commented on Jan 18, 2024

    @awegmann
    Contributor

    Hi everybody. Mea culpa. ConsoleUI is not really maintained anymore from my side. I would be pleased, if the project can live directly with JLine.
    When I started ConsoleUI using JLine2 was the way to go, but the way I caught the keystrokes also felt a bit awkward. I knew, that JLine was not designed to allow this kind of usage.
    Which jline3 this part of the code also had to be changed. If ConsoleUI were a part of JLine, the integration would benefit.
    To answer your question, Guillaume: yes, I would like ConsoleUI to live its life in your project.

  11. gnodet commented on Jan 18, 2024

    @gnodet
    Member

    Hi everybody. Mea culpa. ConsoleUI is not really maintained anymore from my side. I would be pleased, if the project can live directly with JLine. When I started ConsoleUI using JLine2 was the way to got, but the way I caught the keystrokes also felt a bit awkward. I knew, that JLine was not designed to allow this kind of usage. Which jline3 this part of the code also had to be changed. If ConsoleUI were a part of JLine, the integration would benefit. To answer your question, Guillaume: yes, I would like ConsoleUI to live its life in your project.

    Ok, thx for the quick reply !

    @mattirn @lutzseverino do you want to take a look at creating a PR to merge ConsoleUI into JLine in a new module ?

  12. reopened this on Jan 18, 2024
  13. mattirn commented on Jan 19, 2024

    @mattirn
    Collaborator

    Ok, I can do a PR.

  14. changed the title [-]Interactive menus: possible?[/-] [+]Merge ConsoleUI to provide interactive menus[/+] on Feb 27, 2024
  15. added this to the 3.26.0 milestone on Feb 27, 2024
  16. added a commit that references this issue on Apr 17, 2024
    9c53282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions