Skip to content

Feature/use confirm composable#16

Open
XanderVertegaal wants to merge 9 commits into
developfrom
feature/use-confirm-composable
Open

Feature/use confirm composable#16
XanderVertegaal wants to merge 9 commits into
developfrom
feature/use-confirm-composable

Conversation

@XanderVertegaal
Copy link
Copy Markdown
Contributor

We want an easy way to create 'Yes/No' confirmation modals in MyResearch, so I stole ripped borrowed this from DIAPP. Technically, it also exposes useMountComponent, which I will document in a future PR.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new useConfirm composable (and underlying mounting helper + dialog component) to enable programmatic “Yes/No” confirmation modals, along with documentation updates in the Nuxt docs app.

Changes:

  • Introduces useConfirm and useMountComponent composables to mount and control a confirmation dialog programmatically.
  • Adds BSConfirmDialog (built on BSModal) and exposes the new composables via the library’s composables entrypoint.
  • Adds a docs page + nav entry, and tweaks Nuxt/Vite config for the docs app.

Reviewed changes

Copilot reviewed 8 out of 22 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
vue-lib-doc/pages/vue-lib-composables/use-confirm.vue New documentation page demonstrating useConfirm usage and options.
vue-lib-doc/nuxt.config.ts Adds Vite settings for dependency optimization + SCSS preprocessing behavior in docs.
vue-lib-doc/components/NavBar.vue Adds navigation entry to reach the new composable docs page.
src/cdh-vue-lib/composables/useMountComponent.ts New helper to programmatically mount components and tear them down.
src/cdh-vue-lib/composables/useConfirm.ts New useConfirm composable wiring options into BSConfirmDialog.
src/cdh-vue-lib/composables.ts Exports the new composables from the library entrypoint.
src/cdh-vue-lib/components/bootstrap/BSConfirmDialog.vue New dialog component providing confirm/cancel UI and async callback handling.
package.json Updates exports mapping for the main entry (types + ESM import).
dist/* Regenerated build artifacts reflecting the new composables/component and bundling changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cdh-vue-lib/composables/useMountComponent.ts Outdated
Comment thread src/cdh-vue-lib/composables/useMountComponent.ts
Comment thread src/cdh-vue-lib/composables/useMountComponent.ts Outdated
Comment thread src/cdh-vue-lib/composables/useConfirm.ts
Comment thread src/cdh-vue-lib/composables/useConfirm.ts Outdated
Comment thread src/cdh-vue-lib/components/bootstrap/BSConfirmDialog.vue Outdated
Comment thread vue-lib-doc/pages/vue-lib-composables/use-confirm.vue
Comment thread vue-lib-doc/pages/vue-lib-composables/use-confirm.vue
Comment thread vue-lib-doc/components/NavBar.vue Outdated
Comment thread vue-lib-doc/nuxt.config.ts Outdated
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