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

Inquiry if horizontal scroller-ish is available? #102

Closed
AnirudhG07 opened this issue Aug 4, 2024 · 4 comments
Closed

Inquiry if horizontal scroller-ish is available? #102

AnirudhG07 opened this issue Aug 4, 2024 · 4 comments

Comments

@AnirudhG07
Copy link
Contributor

Hi I am new to beaupy and have some queries.
Does beaupy allow some way where someone can select in a horizontal bar, like volume where you grab the dot and move around. So i want to basically let someone choose a number(including decimal till 2 places) between 0 to 14(pH) and i was hoping instead of letting someone type it, maybe scroll horizontally.

Is there any other alternative beaupy offers?

Also can you refer some docs/example which prevents the output from disappearing. Like i want things to be printed below each other.

Thanks!

@petereon
Copy link
Owner

petereon commented Aug 5, 2024

Hi @AnirudhG07, this type of UI element is currently not supported, nor do I think it is within the scope of beaupy.

I can image it being implemented on top of select functionality in questo (beaupy's underlying framework), but it is not supported out of the box and questo is poorly documented at the moment, so it would be an effortful endeavor. I also can't think of any alternative library that would implement this sort of slider element in terminal.

As for your second question - persistent output is currently not supported, but I think it should be easy enough to implement, I'll look into it in very near future.

@AnirudhG07
Copy link
Contributor Author

Thanks for the answer.
It would be great if you could give an option to switch on/off the persistence. That would really helpful since sometimes people would like to see what they chose, especially in scientific community where you just confirm the inputs chosen are correct or not. I am forced to use inquirer because of that, though some of my tools use beaupy cause i like the dissapearing part.

@petereon
Copy link
Owner

petereon commented Aug 5, 2024

There is now the option to keep CLI elements displayed after their context has ended. It's controlled by Config.transient option. It defaults to True, setting it to False will ensure it the elements remain visible. It's published to PyPI as beaupy==3.9.0

@AnirudhG07
Copy link
Contributor Author

damn, that was fast. respects and thanks!!! i ll look into it for sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants