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

Keeping the given content and the selected action in AskActionMessage function #1017

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NaguiHW
Copy link

@NaguiHW NaguiHW commented May 23, 2024

I was developing a kind of admin manager view for a user with admin role and this admin can upload more data and delete data from the database and I was using the AskActionMessage function and I found that is a bit confusing only show the default message: **Selected:** {res["label"] when we are asking more than 1 action to the user.

This is why I created this pr to solve this issue.

This is an example:
Screenshot 2024-05-23 002612
If you see the 2 first answers, you don't know the context, but in the third one you can see the question and the action selected.

I just added an optional parameter keep_content that is a boolean and is False by default.

Of course this is useful only if we are going to ask more than 1 action. Like I said when I was developing this type of view, like an admin panel, I have to use at least 6 AskActionMessage.

I know that we have @cl.action_callback("action_button"), but is not the same, because the input query is not disabled and is not that clear how we can delete all other action buttons if we have more than 1 action.

@dokterbob
Copy link
Collaborator

@NaguiHW Thanks for this great contrib! Sorry it took us quite a while to get back to you!

Does your contrib has any implications for the documentation? If so, could you please propose any relevant changes to the docs

Lastly, I want to test this! Any chance you could supply me a minimal test project and basic testing instructions so I can observe the before/after difference so I can manually reproduce the issue and observe your proposed solution? ❤️

@dokterbob dokterbob added the enhancement New feature or request label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants