php-school / cli-menu

🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.
http://www.phpschool.io
MIT License
1.94k stars 107 forks source link

Menu Dialog #247

Closed ccsliinc closed 2 years ago

ccsliinc commented 3 years ago

Looking through the code, the confirm dialog is not actually a confirmation. It has no return value, am i missing something or the way it currently is just another layer in which a user cannot back out? It seems like there is nothing I can do with a dialog other than click enter. You cant even escape out.

I am just asking to know if there is an alternative.

AydinHassan commented 3 years ago

Well it was just created for that scenario - so the user performs an action and accepts that something will happen, it will block until it is accepted. It did not need a return value for our usage because to be unlocked it must be accepted.

What would you like an alternative for? What are you trying to achieve?

ccsliinc commented 3 years ago

I was just trying to figure out if the user did not want to go through with the action what would they do. Even something as simple as hitting the escape key would allow them to exit the process. The only way I see it’s possible right now is if they actually exit the whole process itself. So for example if it was a confirm deletion dialogue and they accidentally hit it, then they have no way of backing out.

AydinHassan commented 3 years ago

Of course, I don't dispute your use-case. It makes total sense. However, it is not supported right now. We would happily accept this as a feature request if you are interested in working on it :)

ccsliinc commented 3 years ago

Yes, Thank you i will work on it.

AydinHassan commented 3 years ago

Just remembered someone started this a while ago - maybe you can use it https://github.com/php-school/cli-menu/pull/65

ccsliinc commented 3 years ago

I will have a pull request by Monday. It’s full working non breaking. Just learning to write tests.

ccsliinc commented 3 years ago

PR sent.

AydinHassan commented 2 years ago

Fixed with #248

ccsliinc commented 2 years ago

Is there any way you can add a point release to this PR. I use this but it's a requirement for another component. I'd like it to pull this release.

ccsliinc commented 2 years ago

Is there any way you can add a point release to this PR. I use this but it's a requirement for another component. I'd like it to pull this release.

AydinHassan commented 2 years ago

@ccsliinc 4.2.0

ccsliinc commented 2 years ago

@AydinHassan Thank you.