Skip to content

Conversation

xvaara
Copy link
Contributor

@xvaara xvaara commented May 14, 2025

…odelValue is number. fix(useToastController): if using the deprecated show method the countdown didn't start.

closes #2687

Describe the PR

Breaking Change: BPopover and BTooltip prop custom-class renamed to body-class and added title-class

Small replication

A small replication or video walkthrough can help demonstrate the changes made. This is optional, but can help observe the intended changes. A mentioned issue that contains a replication also works.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 🐛 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

Summary by CodeRabbit

  • New Features
    • Added a new option to hide the progress bar in toast notifications.
    • Added support for custom CSS classes on popover and tooltip title and body sections.
  • Documentation
    • Updated usage examples and documentation for toast controls, including new methods and improved guidance.
  • Bug Fixes
    • Improved event handling for toast and modal components, allowing for more precise differentiation of event outcomes.
  • Refactor
    • Enhanced type definitions and consolidated event signatures for better maintainability and consistency.
  • Chores
    • Updated internal method signatures to support additional options when creating toasts.

…odelValue is number. fix(useToastController): if using the deprecated show method the countdown didn't start.
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@xvaara xvaara requested review from dwgray and Copilot May 14, 2025 08:40
Copy link

coderabbitai bot commented May 14, 2025

"""

Walkthrough

The changes introduce a new noProgress prop to the BToast component, update event handling for toast and modal events, revise toast controller plugin and injection key signatures, and overhaul the toast controller documentation to use the new create/destroy API instead of the deprecated show/remove methods. No unrelated logic or error handling is altered.

Changes

File(s) Change Summary
apps/docs/src/data/components/toast.data.ts, packages/bootstrap-vue-next/src/components/BToast/BToast.vue, packages/bootstrap-vue-next/src/types/ComponentProps.ts Added a new boolean prop noProgress (default false) to BToast and its type definitions, allowing toasts to hide the progress bar.
apps/docs/src/docs/composables/useToastController.md Updated documentation and examples to use the new create/destroy toast API, replacing all references to deprecated show/remove methods, and added a section on promise-based usage.
packages/bootstrap-vue-next/src/components/BToast/BToastOrchestrator.vue Refined event handler logic for @hide and @hidden events to set e.ok as true, false, or null based on the trigger ('ok', 'cancel', or other).
packages/bootstrap-vue-next/src/plugins/toastController/index.ts Modified the deprecated show method to return the result of create(obj) directly, without calling .show() on it.
packages/bootstrap-vue-next/src/types/ComponentEmits.ts Added 'cancel' and 'ok' event signatures to showHideEmits and removed them from BModalEmits to consolidate event definitions.
packages/bootstrap-vue-next/src/utils/keys.ts Updated the toastPluginKey injection key's create method to accept an optional options parameter of type ToastOrchestratorCreateOptions.
packages/bootstrap-vue-next/src/components/BPopover/BPopover.vue, apps/docs/src/data/components/popover.data.ts, packages/bootstrap-vue-next/src/types/ComponentProps.ts Renamed customClass to bodyClass and added titleClass prop to BPopover component and its typings; removed customClass usage from BPopover.vue.
packages/bootstrap-vue-next/src/components/BTooltip/BTooltip.vue Removed content and customClass props; added bodyClass and titleClass props to the tooltip component.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant useToastController
    participant BToastOrchestrator
    participant BToast

    User->>useToastController: create(toastProps)
    useToastController->>BToastOrchestrator: create(toastProps)
    BToastOrchestrator->>BToast: Render toast with props (including noProgress)
    User->>useToastController: .destroy() (on returned control object)
    useToastController->>BToastOrchestrator: Hide toast
    BToastOrchestrator->>BToast: Trigger hide event
Loading

Assessment against linked issues

Objective Addressed Explanation
Update documentation/examples to use correct toast show/hide API (create/destroy) instead of show/remove (#2687)
Ensure programmatic hiding of toasts works with new API, and docs reflect this (#2687)
Clarify and correct event handling for toast hide/close/cancel/ok triggers (#2687)

Suggested reviewers

  • VividLemon

Poem

A toast to the code, with progress bar or none,
Now create brings the pop-up, and destroy says "done!"
Docs are refreshed, events clear as can be,
Modal and toast, in sweet harmony.
🐇 Cheers to the team—ship it, with glee!
"""

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@Copilot 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

This PR implements a new noProgress property to allow hiding the progress bar in BToast components and updates the toast creation API to use a new create method with an optional options parameter. Key changes include:

  • Updating the create API by adding an optional ToastOrchestratorCreateOptions parameter.
  • Adding the noProgress prop to BToast components and adjusting the conditional rendering of the progress bar.
  • Updating documentation and examples to replace the deprecated show method with create.

Reviewed Changes

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

Show a summary per file
File Description
packages/bootstrap-vue-next/src/utils/keys.ts Updated create signature to accept an optional options parameter.
packages/bootstrap-vue-next/src/types/ComponentProps.ts Added noProgress prop to BToastProps.
packages/bootstrap-vue-next/src/types/ComponentEmits.ts Adjusted event definitions by adding cancel/ok events in showHideEmits and removing them from BModalEmits.
packages/bootstrap-vue-next/src/plugins/toastController/index.ts Modified deprecated show method to return create(obj) instead of create(obj).show().
packages/bootstrap-vue-next/src/components/BToast/BToastOrchestrator.vue Updated event handling logic for consistent resolution of the ok property.
packages/bootstrap-vue-next/src/components/BToast/BToast.vue Changed condition for rendering the progress bar and added the noProgress default prop.
apps/docs/src/docs/composables/useToastController.md Replaced deprecated show method references with create across usage examples.
apps/docs/src/data/components/toast.data.ts Documented the new noProgress prop in the component data.
Comments suppressed due to low confidence (2)

packages/bootstrap-vue-next/src/utils/keys.ts:226

  • Consider adding JSDoc comments to document the new 'options' parameter in the create method, outlining its purpose and expected properties.
create: (obj: ToastOrchestratorCreateParam, options?: ToastOrchestratorCreateOptions) => PromiseWithToast

packages/bootstrap-vue-next/src/components/BToast/BToast.vue:89

  • Verify that the new condition correctly handles cases where progressProps might be undefined; ensure the intended behavior is maintained when both noProgress is false and no progressProps are provided.
v-if="typeof modelValue === 'number' && !props.noProgress"

Copy link

pkg-pr-new bot commented May 14, 2025

bsvn-vite-ts

npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next@2695
npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next/@bootstrap-vue-next/nuxt@2695

commit: 18ce3b5

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/docs/src/docs/composables/useToastController.md (2)

313-314: Fix formatting in code example

There are trailing spaces in the code that should be removed to maintain consistent formatting.

-        default: ({hide}) =>
-          [ 
-            h('h2', {class: 'text-center mb-3'}, 'Ready?'), 
-            h('div', {class: 'd-flex justify-content-center gap-2'}, [
-              h(BButton, {onClick: () => hide('ok'), size: 'lg'}, () => 'Yes'), 
-              h(BButton, {onClick: () => hide('cancel'), size: 'lg'}, () => 'No')
+        default: ({hide}) => [
+            h('h2', {class: 'text-center mb-3'}, 'Ready?'),
+            h('div', {class: 'd-flex justify-content-center gap-2'}, [
+              h(BButton, {onClick: () => hide('ok'), size: 'lg'}, () => 'Yes'),
+              h(BButton, {onClick: () => hide('cancel'), size: 'lg'}, () => 'No')

Also applies to: 316-318

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

313-313: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


314-314: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


303-303: Remove extra blank line

There are multiple consecutive blank lines here which should be reduced to a single blank line.

-

-
+
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

303-303: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc85d94 and 718403f.

📒 Files selected for processing (8)
  • apps/docs/src/data/components/toast.data.ts (1 hunks)
  • apps/docs/src/docs/composables/useToastController.md (10 hunks)
  • packages/bootstrap-vue-next/src/components/BToast/BToast.vue (2 hunks)
  • packages/bootstrap-vue-next/src/components/BToast/BToastOrchestrator.vue (2 hunks)
  • packages/bootstrap-vue-next/src/plugins/toastController/index.ts (1 hunks)
  • packages/bootstrap-vue-next/src/types/ComponentEmits.ts (1 hunks)
  • packages/bootstrap-vue-next/src/types/ComponentProps.ts (1 hunks)
  • packages/bootstrap-vue-next/src/utils/keys.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/bootstrap-vue-next/src/types/ComponentEmits.ts (1)
packages/bootstrap-vue-next/src/utils/classes.ts (1)
  • BvTriggerableEvent (68-90)
🪛 LanguageTool
apps/docs/src/docs/composables/useToastController.md

[style] ~152-~152: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...t Hiding a Toast programmatically is very simple. create return an object that has fun...

(EN_WEAK_ADJECTIVE)

🪛 markdownlint-cli2 (0.17.2)
apps/docs/src/docs/composables/useToastController.md

303-303: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


313-313: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


314-314: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


316-316: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (18)
packages/bootstrap-vue-next/src/types/ComponentProps.ts (1)

1252-1252: New property added to control progress bar visibility.

The addition of the noProgress property to BToastProps provides a clean way to control the visibility of the progress bar in toast components. This aligns with the PR objective to enhance toast functionality.

apps/docs/src/data/components/toast.data.ts (1)

85-89: Documentation added for new noProgress property.

The documentation properly describes the new noProgress property, its type, default value, and purpose. This ensures developers can understand and use the new feature correctly.

packages/bootstrap-vue-next/src/components/BToast/BToastOrchestrator.vue (2)

31-31: Enhanced event handling for toast actions.

The logic for the @hide event handler has been improved to better differentiate between different types of toast dismissals. This provides more detailed feedback through the e.ok property with three possible states (true, false, null) based on the trigger type.


45-45: Consistent event handling for hidden event.

The same improved logic has been correctly applied to the @hidden event handler, maintaining consistency between both event handlers and ensuring proper state propagation throughout the toast lifecycle.

packages/bootstrap-vue-next/src/components/BToast/BToast.vue (3)

89-89: Improved progress bar visibility condition

The condition for showing the progress bar has been updated to use the new noProgress prop instead of relying on the presence of progressProps. This is a cleaner approach that makes the intent more explicit.


90-95: Good use of optional chaining for progressProps

Using optional chaining (?.) to access properties of progressProps is a safer approach that prevents errors when progressProps is undefined.


138-138: Added new noProgress prop

This new prop allows explicit control over the progress bar display, aligning with the PR objective to make progress indication more intuitive.

packages/bootstrap-vue-next/src/types/ComponentEmits.ts (1)

12-13: Consolidated 'cancel' and 'ok' events to shared interface

Moving these event signatures to the showHideEmits interface improves code organization and ensures consistent event typing across components.

packages/bootstrap-vue-next/src/utils/keys.ts (2)

29-29: Added ToastOrchestratorCreateOptions import

This import is necessary for the updated create method signature.


226-229: Extended create method signature with optional options parameter

The create method now accepts an additional optional parameter for creation options, providing more flexibility and control over toast creation. This enhancement supports the fix for the countdown timer issue mentioned in the PR objectives.

apps/docs/src/docs/composables/useToastController.md (8)

39-39: Updated basic example to use create instead of show

The documentation has been updated to use the new create method instead of the deprecated show method in the basic example.

Also applies to: 44-44, 48-48


77-77: Updated reactivity example to use create method

The reactive example now correctly uses the create method, aligning with the API changes.

Also applies to: 89-90


120-120: Updated advanced usage example to use create method

The advanced usage example has been updated to use create instead of show, maintaining consistency with the API changes.

Also applies to: 133-134


152-153: Updated programmatic hiding description

The documentation now correctly explains that create returns an object with control functions including destroy.

🧰 Tools
🪛 LanguageTool

[style] ~152-~152: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...t Hiding a Toast programmatically is very simple. create return an object that has fun...

(EN_WEAK_ADJECTIVE)


176-192: Improved toast destruction example

The example for programmatically hiding a toast has been updated to store the return value of create and call destroy on it, which is more intuitive than using a separate remove function.


200-247: Added new section on using promises with toasts

This new section demonstrates how to use promises with the create method, showing a common pattern for creating interactive toasts. This enhances the documentation by covering more advanced use cases.


259-261: Updated script setup example to use create and destroy

The script setup example has been updated to use the new API pattern with create and its returned destroy method.

Also applies to: 265-271


304-326: Added promise toast example implementation

The implementation of the promise toast example correctly demonstrates how to use the resolveOnHide option and handle the result in a then chain.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

313-313: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


314-314: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


316-316: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

@xdbr
Copy link

xdbr commented May 15, 2025

Hi there and many thanks for your efforts!

I have just tried to put this merge request to practice, but it fails me.

Here's a rundown of my setup and what I have tried in the form of a minimal example:

Install the merge request

npm uninstall bootstrap-vue-next -S
npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next@2695 -S

vite config

I am not using nuxt, so I'm not including any composables separately, as per the docs:

// nuxt.config.js/ts
export default defineNuxtConfig({
  modules: ['@bootstrap-vue-next/nuxt'],
  bootstrapVueNext: {
    composables: true, // Will include all composables
    // composables: {useBreadcrumb: true, useColorMode: true, all: false}, // Will include only useBreadcrumb & useColorMode
    // composables: {useBreadcrumb: false, useColorMode: false, all: true} // Will include everything except useBreadcrumb & useColorMode
    directives: {all: true}, // Will include all directives
    css: true, // Will include the module's CSS. If set to false, you can add the CSS manually in the 'css' property below
  },
  css: [
    // 'bootstrap/dist/css/bootstrap.min.css' // Not necessary if `css: true`
  ],
})

instead, this is my vite.config.js:

import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import Components from 'unplugin-vue-components/vite'
import { BootstrapVueNextResolver } from 'bootstrap-vue-next'
import AutoImport from 'unplugin-auto-import/vite'

// https://vite.dev/config/
export default defineConfig({
  build: {
    minify: false,
  },
  css: {
    devSourcemap: true,
  },
  plugins: [
    vue(),
    Components({
      resolvers: [BootstrapVueNextResolver()],
    }),
    AutoImport({
      include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.md$/,],
      imports: [
        'vue',
        { 'mande': ['mande'], },
      ],
      dts: true, //'./auto-imports.d.ts',
      viteOptimizeDeps: true,
      eslintrc: {
        enabled: true,
      },
    }),
    vueDevTools(),
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    },
  },
})

Usage within the component

In my component, I import the useToastController and use it in the template:

<script setup lang="ts">
import { useToastController } from 'bootstrap-vue-next'
const { create } = useToastController()
const sayHello = () => {
  create({ title: 'Hello', body: 'World' })
}
</script>

<template>
       <BButton size="sm" @click="sayHello(row)">Draft</BButton>
</template>

Setup BToastOrchestrator

I have anBToastOrchestrator set up in my App.vue:

<template>
  <header>
    <BNavbar v-b-color-mode="'light'" variant="secondary-subtle">
       <!-- navbar stuff -->
    </BNavbar>
  </header>

  <main>
    <RouterView />
    <BToastOrchestrator />
  </main>
</template>

Console Error Output

TypeError: toastContollerPlugin is undefined
    useToastController https://[...]/assets/index-b3lnoBxo.js:9050
    useToaster https://[...]/assets/index-b3lnoBxo.js:14163
    initialize https://[...]/assets/index-b3lnoBxo.js:14247
    wrappedAction https://[...]/assets/index-b3lnoBxo.js:7977
    initialize https://[...]/assets/TableView-DCzy4wDN.js:9649
    wrappedAction https://[...]/assets/index-b3lnoBxo.js:7977
    setup https://[...]/assets/TableView-DCzy4wDN.js:12200
    createHook https://[...]/assets/index-b3lnoBxo.js:3115
    callWithErrorHandling https://[...]/assets/index-b3lnoBxo.js:1985
    callWithAsyncErrorHandling https://[...]/assets/index-b3lnoBxo.js:1992
    __weh https://[...]/assets/index-b3lnoBxo.js:3100
    flushPostFlushCbs https://[...]/assets/index-b3lnoBxo.js:2139
    flushJobs https://[...]/assets/index-b3lnoBxo.js:2175
    promise callback*queueFlush https://[...]/assets/index-b3lnoBxo.js:2088
    queueJob https://[...]/assets/index-b3lnoBxo.js:2083
    scheduler https://[...]/assets/index-b3lnoBxo.js:4979
    trigger https://[...]/assets/index-b3lnoBxo.js:489
    endBatch https://[...]/assets/index-b3lnoBxo.js:547
    notify https://[...]/assets/index-b3lnoBxo.js:757
    trigger https://[...]/assets/index-b3lnoBxo.js:744
    set value https://[...]/assets/index-b3lnoBxo.js:1538
    finalizeNavigation https://[...]/assets/index-b3lnoBxo.js:16120
    pushWithRedirect https://[...]/assets/index-b3lnoBxo.js:16030
    promise callback*pushWithRedirect https://[...]/assets/index-b3lnoBxo.js:16009
    push https://[...]/assets/index-b3lnoBxo.js:15941
    install https://[...]/assets/index-b3lnoBxo.js:16276
    use https://[...]/assets/index-b3lnoBxo.js:3820
    <anonymous> https://[...]/assets/index-b3lnoBxo.js:16352

Corresponding excerpt from index.js:

 const toastContollerPlugin = inject(toastPluginKey, {
    toasts: ref([]),
    create: noopPromise,
    /*
      @deprecated
      */
    show: noopPromise,
    _isAppend: ref(false),
    _isOrchestratorInstalled: ref(false)
  });
  if (toastContollerPlugin.create === noopPromise) {      // <--- this is the culprit line
    throw new Error(
      "useToastController() was called outside of the setup() function! or the plugin is not provided."
    );
  }
  return {
    ...toastContollerPlugin
  };
};

Please let me know if I am doing something wrong, thanks!

@xvaara
Copy link
Contributor Author

xvaara commented May 15, 2025

@xdbr did you install our plugin in the main.js (or .ts) file?

https://bootstrap-vue-next.github.io/bootstrap-vue-next/docs.html#installation-vue-js

Also vite config is different from nuxt config.

xvaara added 2 commits May 15, 2025 17:57
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 6831fa5 and 18ce3b5.

📒 Files selected for processing (1)
  • apps/docs/src/data/components/popover.data.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (1)
apps/docs/src/data/components/popover.data.ts (1)

113-116: Added new titleClass prop for styling popover titles.

Good addition! This new prop provides better customization by allowing separate styling for the popover's title section, which complements the bodyClass prop for the body section. This enhances the component's flexibility and follows the pattern of other Bootstrap Vue components.

Copy link
Member

@dwgray dwgray left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks!

@dwgray dwgray changed the title feat(BToast): add noProgress prop, make progress show as default if m… feat(BToast)! add noProgress prop, make progress show as default if m… May 15, 2025
@xvaara xvaara merged commit 2a9e30b into bootstrap-vue-next:main May 15, 2025
5 checks passed
@xvaara xvaara deleted the toast-fixes branch May 15, 2025 17:50
@coderabbitai coderabbitai bot mentioned this pull request Aug 11, 2025
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

Successfully merging this pull request may close these issues.

useToastOrchestrator show/hide issues
3 participants