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

Add composable confirmation dialog #15008

Merged

Conversation

davelopez
Copy link
Contributor

Similar to #14935, this adds a wrapper for the Bootstrap modal confirmation message box ($bvModal.msgBoxConfirm) that can be used in composition API.

Usage example:

<script setup>
import { useConfirmDialog } from "composables/confirmDialog";

const { confirm } = useConfirmDialog();

async function doThingOnConfirm() {
  const confirmed = await confirm(`Are you 120% sure?`, { okVariant: "danger" });
  if (confirmed) {
    // Do the thing
  }
}
</script>

image

Required for #14839

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Adds a wrapper for Bootstrap modal confirmation message box that can be used in composition API
@github-actions github-actions bot added this to the 23.0 milestone Nov 17, 2022
@bgruening bgruening merged commit 76fc057 into galaxyproject:dev Nov 17, 2022
@github-actions
Copy link

This PR was merged without a "kind/" label, please correct.

@davelopez davelopez deleted the add_composable_confirmation_dialog branch November 17, 2022 17:42
@davelopez
Copy link
Contributor Author

Thanks for the review and merge!

@guerler guerler mentioned this pull request Nov 19, 2022
@jdavcs jdavcs mentioned this pull request Nov 22, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants