Skip to content

Conversation

@dwgray
Copy link
Member

@dwgray dwgray commented Oct 24, 2025

Describe the PR

  • update the docs for the BToast component
  • update migration guide
  • update component data
  • do some consolidation of BToast and BAlert component data
  • update parity spreadsheet

Small replication

N/A

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

    • Close-button customization, progress-bar props, interval and pause controls, and ARIA/status toggles added to dismissible components.
    • Toast slots expanded (default/title/close) and Toast demo/examples updated to show programmatic and v-model usage.
    • Emission behavior standardized to a dismissible pattern (update:model-value, close, close-countdown).
  • Documentation

    • Migration guide and Toast docs expanded with usage, accessibility guidance, and new examples.

Copilot AI review requested due to automatic review settings October 24, 2025 03:04
@bolt-new-by-stackblitz
Copy link

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

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR consolidates dismissible show/hide emits and expands common props, refactors Alert and Toast data to pick shared props, replaces showHideEmits usage with buildDismissibleEmits, removes redundant cancel/ok emits across several components, and adds/updates demos and documentation for BootstrapVueNext migration and toast usage.

Changes

Cohort / File(s) Change Summary
Common props & emit utilities
apps/docs/src/utils/commonProps.ts, apps/docs/src/utils/showHideData.ts
Added props to commonProps (closeClass, closeContent, closeLabel, closeVariant, interval, isStatus, progressProps, showOnPause); changed showHideEmits (added cancel/ok); added buildDismissibleEmits() returning merged dismissible emits including update:model-value, close, close-countdown.
Alert & Toast data
apps/docs/src/data/components/alert.data.ts, apps/docs/src/data/components/toast.data.ts
Switched imports from showHideEmits to buildDismissibleEmits; replaced explicit prop declarations by pick(buildCommonProps(), ...); replaced explicit close/cancel/ok emits with ...buildDismissibleEmits() and adjusted update:model-value typing and slot docs for toast.
Emits removal across components
apps/docs/src/data/components/collapse.data.ts, apps/docs/src/data/components/offcanvas.data.ts, apps/docs/src/utils/dropdownCommon.ts, apps/docs/src/utils/popover-shared.ts
Removed cancel and ok emits from these emit records, narrowing the public emitted API surface.
Demo components & snippets
apps/docs/src/docs/components/demo/ToastOverview.vue, apps/docs/src/docs/components/demo/ToastPositioning.vue, apps/docs/src/docs/demo/ToastBootstrapVue.vue, apps/docs/src/docs/demo/ToastBootstrapVueNext.vue, apps/docs/src/docs/demo/ModalSlotScopeBootstrapVue.ts, apps/docs/src/docs/demo/ModalSlotScopeBootstrapVueNext.ts
Updated ToastOverview to use v-model="show" with a button trigger; small styling tweak in ToastPositioning; added BootstrapVue vs BootstrapVueNext demo snippets and new toast demo components showing v-model/auto-dismiss examples.
Docs & migration guide
apps/docs/src/docs/components/toast.md, apps/docs/src/docs/migration-guide.md
Expanded toast docs (features, accessibility, roles, progress-props, useToast guidance); overhauled migration guide with BootstrapVueNext changes: prop renames/removals, new composables (useToast/useModal), events/slots changes, and deprecation notes for BToaster.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ToastComponent
    participant CommonProps as buildCommonProps()
    participant Dismissible as buildDismissibleEmits()

    User->>ToastComponent: Render / interact (show/close)
    ToastComponent->>CommonProps: pick(shared props)
    CommonProps-->>ToastComponent: props (closeClass, interval, progressProps, ...)
    ToastComponent->>Dismissible: request emits config
    Dismissible-->>ToastComponent: emits (update:model-value, close, close-countdown, + show/hide lifecycle)
    alt User clicks close
      ToastComponent-->>User: emit('close', trigger)
      ToastComponent-->>User: emit('update:model-value', false)
    else Auto-dismiss countdown
      Dismissible-->>ToastComponent: emit('close-countdown', remainingMs)
      ToastComponent-->>User: emit('update:model-value', false) when done
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • VividLemon
  • xvaara

Poem

🐰
I nibble props and tidy emits,
Shared roots stitched for Toasts and Alerts,
Docs hop forward, demos brightly lit,
Small changes tucked in tidy burrows,
Hooray — a cleaner springtime for UI! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "docs(BToast): Parity" follows the Conventional Commits format correctly with the docs prefix and component reference. It is clearly related to the changeset, which focuses on updating BToast documentation and component data to achieve feature parity between BootstrapVue and BootstrapVueNext. The title specifically references the primary component being modified (BToast) and indicates the nature of the changes (parity-related updates). While "Parity" could be slightly more descriptive about what specific aspect is being synchronized, the title is sufficiently clear for developers scanning history to understand the main change relates to BToast documentation and parity improvements.
Description Check ✅ Passed The PR description follows the provided template structure and includes all required sections. The "Describe the PR" section clearly lists the key changes (updating docs, migration guide, component data, consolidation, and parity spreadsheet). The "Small replication" section is appropriately marked as N/A. The PR checklist is properly completed with the "Documentation update" checkbox marked and the Conventional Commits checkbox verified. The description provides sufficient context about what is being updated and confirms adherence to required conventions.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

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 updates the documentation for the BToast component to achieve parity with BootstrapVue, including comprehensive migration guide documentation, component data consolidation, and updated examples.

Key Changes

  • Consolidated shared dismissible component properties between BAlert and BToast to eliminate duplication
  • Added comprehensive migration guide section documenting the transition from BootstrapVue's $bvToast system to useToast composable
  • Enhanced toast documentation with detailed accessibility guidance and feature descriptions

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/docs/src/utils/showHideData.ts Added buildDismissibleEmits() factory function for shared emit definitions
apps/docs/src/utils/commonProps.ts Added common dismissible component props (close button, countdown, status)
apps/docs/src/docs/migration-guide.md Added comprehensive BToast and BToaster migration documentation with event/prop/slot changes
apps/docs/src/docs/demo/ToastBootstrapVueNext.vue Created example demonstrating new v-model usage patterns
apps/docs/src/docs/demo/ToastBootstrapVue.vue Created example showing old auto-hide prop patterns
apps/docs/src/docs/demo/ModalSlotScopeBootstrapVueNext.ts Extracted modal slot scope interface for reusable documentation fragment
apps/docs/src/docs/demo/ModalSlotScopeBootstrapVue.ts Extracted BootstrapVue modal slot scope for comparison fragment
apps/docs/src/docs/components/toast.md Enhanced component documentation with features list, accessibility tips, and clarifications
apps/docs/src/docs/components/demo/ToastPositioning.vue Added margin styling to positioning demo buttons
apps/docs/src/docs/components/demo/ToastOverview.vue Improved overview example with visual background and show/hide interaction
apps/docs/src/data/components/toast.data.ts Updated to use shared props/emits and added comprehensive slot scope documentation
apps/docs/src/data/components/alert.data.ts Refactored to use shared props/emits from common utilities

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 24, 2025

bsvn-vite-ts

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

commit: 53b76f1

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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/src/data/components/alert.data.ts (1)

74-93: Remove duplicated emits and correct arg name; follow the BToast pattern

The alert.data.ts emits block spreads buildDismissibleEmits() and then redefines both 'close-countdown' and 'update:model-value', causing duplication and arg-name drift. buildDismissibleEmits() already defines 'update:model-value' with arg key 'value' (not 'update:model-value'), and 'close-countdown' with arg 'value' (not 'closeCountdown'). Compare to toast.data.ts line 72, which only spreads the builder without overrides—this is the correct pattern.

Apply the suggested fix:

      emits: {
        ...buildDismissibleEmits(),
-       'close-countdown': {
-         description: 'Emitted during the countdown with the time remaining',
-         args: {
-           closeCountdown: {
-             description: 'Time remaining on the timer',
-             type: 'number',
-           },
-         },
-       },
        'update:model-value': {
          description: 'Standard event to update the v-model',
          args: {
            value: {
              description: 'modelValue',
              type: 'boolean | number',
            },
          },
        },
      } satisfies EmitRecord<keyof BAlertEmits | 'update:model-value'>,
🧹 Nitpick comments (3)
apps/docs/src/data/components/alert.data.ts (1)

68-71: Fill title slot docs (no TODOs in published docs)

Provide a real description; remove the TODO. If the slot is unscoped, keep scope as {}. If it exposes helpers, document them.

-        title: {
-          description: '',
-          scope: {}, // TODO
-        },
+        title: {
+          description: 'Content to place in the alert header as title',
+          scope: {},
+        },
apps/docs/src/docs/components/toast.md (1)

11-12: Punctuation nit

Add a period at the end of the sentence.

-Toasts are intended to be small interruptions to your visitors or users and therefore should contain minimal, to-the-point, non-interactive content. Please refer to the Accessibility Tips section below for important usage information
+Toasts are intended to be small interruptions to your visitors or users and therefore should contain minimal, to-the-point, non-interactive content. Please refer to the Accessibility Tips section below for important usage information.
apps/docs/src/utils/commonProps.ts (1)

481-485: Use a string-literal union for interval’s sentinel

Type string should mirror TS literal type.

-    interval: {
-      type: 'number | requestAnimationFrame',
-      default: 'requestAnimationFrame',
-      description: 'Sets the interval for refreshing the countdown timer',
-    },
+    interval: {
+      type: 'number | "requestAnimationFrame"',
+      default: 'requestAnimationFrame',
+      description: 'Sets the interval for refreshing the countdown timer',
+    },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 667ea2b and 75351dd.

📒 Files selected for processing (12)
  • apps/docs/src/data/components/alert.data.ts (3 hunks)
  • apps/docs/src/data/components/toast.data.ts (3 hunks)
  • apps/docs/src/docs/components/demo/ToastOverview.vue (1 hunks)
  • apps/docs/src/docs/components/demo/ToastPositioning.vue (1 hunks)
  • apps/docs/src/docs/components/toast.md (3 hunks)
  • apps/docs/src/docs/demo/ModalSlotScopeBootstrapVue.ts (1 hunks)
  • apps/docs/src/docs/demo/ModalSlotScopeBootstrapVueNext.ts (1 hunks)
  • apps/docs/src/docs/demo/ToastBootstrapVue.vue (1 hunks)
  • apps/docs/src/docs/demo/ToastBootstrapVueNext.vue (1 hunks)
  • apps/docs/src/docs/migration-guide.md (2 hunks)
  • apps/docs/src/utils/commonProps.ts (1 hunks)
  • apps/docs/src/utils/showHideData.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/docs/src/data/components/*.data.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/docs/src/data/components/*.data.ts: When adding or modifying component props, events, or slots, ALWAYS update the corresponding .data.ts file in apps/docs/src/data/components/
Documentation format in .data.ts files must match TypeScript interfaces exactly (props, emits, slots definitions)

Files:

  • apps/docs/src/data/components/alert.data.ts
  • apps/docs/src/data/components/toast.data.ts
🧠 Learnings (5)
📚 Learning: 2025-09-12T14:46:49.416Z
Learnt from: CR
PR: bootstrap-vue-next/bootstrap-vue-next#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T14:46:49.416Z
Learning: Applies to packages/bootstrap-vue-next/src/App.vue : Use packages/bootstrap-vue-next/src/App.vue as a local test area for component changes

Applied to files:

  • apps/docs/src/docs/demo/ToastBootstrapVueNext.vue
  • apps/docs/src/docs/demo/ToastBootstrapVue.vue
📚 Learning: 2025-06-05T11:43:10.793Z
Learnt from: xvaara
PR: bootstrap-vue-next/bootstrap-vue-next#2701
File: apps/docs/src/docs/migration-guide.md:622-626
Timestamp: 2025-06-05T11:43:10.793Z
Learning: In migration guides, links to the old/previous version's documentation (like bootstrap-vue.org) are appropriate and helpful when explaining deprecated features, as they provide users with reference points for what they're migrating from.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
📚 Learning: 2025-06-26T19:46:19.333Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:0-0
Timestamp: 2025-06-26T19:46:19.333Z
Learning: BTooltip is a very thin wrapper around BPopover in bootstrap-vue-next. There is no separate `useTooltipController` composable - the `usePopoverController` composable can be used to programmatically control both popovers and tooltips.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('tooltip') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this inheritance mechanism.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('popover') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this prop spreading/inheritance mechanism.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
🧬 Code graph analysis (3)
apps/docs/src/data/components/alert.data.ts (1)
apps/docs/src/utils/showHideData.ts (1)
  • buildDismissibleEmits (160-199)
apps/docs/src/docs/demo/ModalSlotScopeBootstrapVueNext.ts (1)
packages/bootstrap-vue-next/src/types/ComponentSlots.ts (2)
  • BModalSlotsData (45-49)
  • ShowHideSlotsData (12-19)
apps/docs/src/data/components/toast.data.ts (3)
apps/docs/src/utils/showHideData.ts (1)
  • buildDismissibleEmits (160-199)
apps/docs/src/types/index.ts (1)
  • EmitRecord (30-30)
packages/bootstrap-vue-next/src/types/ComponentEmits.ts (1)
  • BToastEmits (42-45)
🪛 LanguageTool
apps/docs/src/docs/components/toast.md

[grammar] ~68-~68: Use a hyphen to join words.
Context: ... method, and the appearance of a ticking down progress bar is a "nice to have". A...

(QB_NEW_EN_HYPHEN)


[grammar] ~68-~68: Use a hyphen to join words.
Context: ...a "nice to have". Although it is not out of the box behavior by Bootstrap, its be...

(QB_NEW_EN_HYPHEN)


[grammar] ~68-~68: Use a hyphen to join words.
Context: ...nice to have". Although it is not out of the box behavior by Bootstrap, its behav...

(QB_NEW_EN_HYPHEN)


[grammar] ~68-~68: Use a hyphen to join words.
Context: ... to have". Although it is not out of the box behavior by Bootstrap, its behavior ...

(QB_NEW_EN_HYPHEN)


[style] ~90-~90: Consider using “incomplete” to avoid wordiness.
Context: ...disabilities. The following list, while not complete, provides general guidelines when using...

(NOT_ABLE_PREMIUM)

🔇 Additional comments (19)
apps/docs/src/docs/components/demo/ToastPositioning.vue (1)

6-9: LGTM! Minor styling improvement.

Adding the m-2 margin utility class improves the spacing of the toast positioning buttons without affecting functionality.

apps/docs/src/docs/demo/ModalSlotScopeBootstrapVue.ts (1)

1-13: LGTM! Clear documentation example.

This static object effectively demonstrates the BootstrapVue slot scope interface for comparison purposes in the migration guide. The snippet region markers and eslint-disable directive are appropriately used.

apps/docs/src/docs/demo/ModalSlotScopeBootstrapVueNext.ts (1)

1-20: LGTM! Accurate interface documentation.

These interface definitions match the actual implementation in the source code (ComponentSlots.ts) and provide a clear reference for migration. The clarifying comment on line 7 about the trigger name change from 'headerclose' to 'close' is particularly helpful for users migrating from BootstrapVue.

apps/docs/src/docs/migration-guide.md (8)

1016-1032: LGTM! Comprehensive deprecation documentation.

The Global Toast Management System Changes section clearly documents the deprecated $bvToast methods and named toaster system, with helpful pointers to the modern useToast composable alternative.


1033-1057: LGTM! Clear props migration guidance.

The Props Changes section effectively documents the shift from separate visibility and auto-hide props to the unified model-value pattern, along with comprehensive coverage of removed and new props.


1058-1067: LGTM! Excellent before/after comparison.

The Auto-dismiss Behavior Changes section with code snippets clearly illustrates the difference between BootstrapVue's explicit auto-hide configuration and BootstrapVueNext's model-value-driven approach.


1068-1080: LGTM! Thorough event system documentation.

The Event System Changes section comprehensively covers the removal of $root events and the addition of new lifecycle events like close-countdown and the standard show/hide event patterns.


1081-1101: LGTM! Well-documented slots changes.

The Slots Changes section clearly documents the renaming of toast-title to title and the enhanced slot scope data with control functions, providing developers with a complete picture of the slot API changes.


1102-1110: LGTM! Important accessibility improvements documented.

The Accessibility Improvements section highlights key ARIA enhancements including the isStatus prop for role toggling and improved keyboard accessibility with tabindex="0".


1113-1118: LGTM! Clear deprecation notice.

The BToaster deprecation section provides a concise explanation with helpful links to the replacement composable and component documentation.


729-744: LGTM! Excellent slot scope comparison.

The Modal Slot Scoped Variables Changes section effectively uses the new demo snippet files to provide a clear before/after comparison of the slot scope interfaces, with helpful annotations of the key changes.

apps/docs/src/docs/demo/ToastBootstrapVue.vue (1)

1-9: LGTM! Clear BootstrapVue pattern example.

This demo effectively illustrates the BootstrapVue approach to auto-dismissing toasts using separate auto-hide and auto-hide-delay props, providing a helpful reference point for the migration guide.

apps/docs/src/docs/demo/ToastBootstrapVueNext.vue (1)

1-18: LGTM! Excellent demonstration of BootstrapVueNext patterns.

This demo clearly illustrates both model-value usage patterns:

  • Boolean binding with v-model for manual control
  • Numeric binding with :model-value="5000" for auto-dismiss duration

This dual-example approach effectively shows the versatility of the new API.

apps/docs/src/docs/components/demo/ToastOverview.vue (1)

1-40: LGTM! Enhanced interactive demo.

The updated demo significantly improves user experience by:

  • Adding an interactive "Show Toast" button to trigger the toast
  • Using the v-model="show" pattern to demonstrate proper state management
  • Providing visual context with the styled background container

This makes the demo more engaging and better illustrates real-world toast usage patterns.

apps/docs/src/utils/showHideData.ts (1)

156-199: Update the misleading comment and document why stubs are necessary.

The stubs are necessary to satisfy the type constraint defineEmits<BToastEmits>() in the actual components (BAlert.vue line 170, BToast.vue line 176), since both use BToastEmits which extends the TS interface showHideEmits that includes cancel and ok events. However, the showHideEmits interface in ComponentEmits.ts includes these modal-specific events, while the JS object version in showHideData.ts does not.

The comment should clarify: these stubs exist to satisfy TypeScript's EmitRecord<keyof BToastEmits> type constraint in the documentation data files, not because the events are truly defined elsewhere. The undefined args/description values may cause documentation generation issues or confusion about which events are actually emitted by alerts and toasts.

Consider:

  1. Update the comment to: "Stubs required to satisfy TypeScript type constraint from BToastEmits/BAlertEmits component definitions"
  2. Review whether BToastEmits and BAlertEmits should include modal-specific cancel/ok events at all
  3. If events should exist, provide proper descriptions instead of undefined; if not, refactor the type hierarchy to avoid the need for stubs
apps/docs/src/data/components/alert.data.ts (1)

22-41: All picked props exist on BAlertProps—docs⇄types parity is satisfied

Verification confirms all 19 properties in the pick(...) call are present on BAlertProps. The bgVariant, textVariant, and variant props are inherited via ColorExtendables; the remaining 16 are direct properties of the interface. No toast-only props were surfaced.

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

24-37: All selected props are valid on BToastProps

Verification confirms all props listed in lines 24-37 of toast.data.ts exist on BToastProps or its inherited types. Props like closeClass, closeContent, closeLabel, closeVariant, headerClass, headerTag, id, interval, isStatus, noHoverPause, noResumeOnHoverLeave, progressProps, and showOnPause are directly defined on BToastProps. The textVariant prop is inherited from ColorExtendables through the interface's extends clause. Documentation-to-types parity is maintained for these selections.


74-162: Documentation verified—no changes required.

The sharedSlots object defined at line 270–277 in BToast.vue exposes exactly the six properties documented in the .data.ts file (id, show, hide, toggle, active, visible), and all three slots (default, title, close) bind this object via v-bind="sharedSlots". The scoped slot API documentation is accurate and complete.

apps/docs/src/docs/components/toast.md (1)

51-54: The review comment contains inaccurate behavioral claims about timer logic—disregard the negative value and rounding assertions.

The doc states:

  • "Negative values for either model-value or interval will stop the timer"
  • "If the model-value does not divide evenly by the interval, the timer will continue to the nearest interval. For example, a model-value of 5400 ms with an interval of 1000 ms will run for 6000 ms"

What the implementation actually does:
The useCountdown composable (lines 37–43) computes remaining time as a simple subtraction (target.value - timestamp.value) with no rounding. Non-positive length values only prevent a restart; they do not stop an active timer. The countdown runs for exactly the specified duration, not rounded to the nearest interval boundary.

The confirmed accurate claims are:

  • Toast root has tabindex="0" (BToast.vue:13)
  • useToast toasts default to teleportTo: 'body' (BToastOrchestrator.vue:22)

Likely an incorrect or invalid review comment.

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/src/data/components/alert.data.ts (1)

74-83: Remove redundant close-countdown emit override or fix argument name to match the actual interface.

The explicit close-countdown definition (lines 75-83) duplicates what's already in buildDismissibleEmits() (which includes 'close-countdown' with arg value). More critically, the override uses arg name closeCountdown instead of value, which is inconsistent with the BToastEmits interface ('close-countdown': [value: number]) and the actual emit in BAlert.vue (emit('close-countdown', remainingMs.value)).

Either remove the explicit definition to use the one from buildDismissibleEmits(), or change the arg name to value to match the type.

♻️ Duplicate comments (1)
apps/docs/src/docs/migration-guide.md (1)

1043-1044: Consolidate redundant guidance for href and to props.

The guidance for href and to props is identical on both lines. Per previous review feedback, consider consolidating these into a single bullet point to reduce redundancy.

Apply this diff:

-- `href` and `to` - Use `useToast` with BLink props or see [BLink Integration](/docs/components/toast#blink-integration) in the toast documentation
+- `href` and `to` - Use `useToast` with BLink props or see [BLink Integration](/docs/components/toast#blink-integration) in the toast documentation
🧹 Nitpick comments (1)
apps/docs/src/docs/components/toast.md (1)

68-68: Apply hyphenation for compound adjectives.

Multiple compound phrases on this line should be hyphenated for clarity per static analysis and style guides.

Apply this diff:

-As you may have noticed in that example, there was a built-in progress bar. This is triggered when using a value that is a `number` and when `progress-props` is not `undefined`. This was implemented because it can be difficult to modify the behavior of `BToast` when using a pure method, and the appearance of a ticking down progress bar is a "nice-to-have". Although it is not out of the box behavior by Bootstrap, its behavior is opt-in. This functions similarly to examples in `BAlert`
+As you may have noticed in that example, there was a built-in progress bar. This is triggered when using a value that is a `number` and when `progress-props` is not `undefined`. This was implemented because it can be difficult to modify the behavior of `BToast` when using a pure-method approach, and the appearance of a ticking-down progress bar is a "nice-to-have". Although it is not out-of-the-box behavior by Bootstrap, its behavior is opt-in. This functions similarly to examples in `BAlert`

Based on learnings

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75351dd and 53b76f1.

📒 Files selected for processing (10)
  • apps/docs/src/data/components/alert.data.ts (4 hunks)
  • apps/docs/src/data/components/collapse.data.ts (0 hunks)
  • apps/docs/src/data/components/offcanvas.data.ts (0 hunks)
  • apps/docs/src/data/components/toast.data.ts (3 hunks)
  • apps/docs/src/docs/components/toast.md (3 hunks)
  • apps/docs/src/docs/migration-guide.md (2 hunks)
  • apps/docs/src/utils/commonProps.ts (1 hunks)
  • apps/docs/src/utils/dropdownCommon.ts (0 hunks)
  • apps/docs/src/utils/popover-shared.ts (0 hunks)
  • apps/docs/src/utils/showHideData.ts (4 hunks)
💤 Files with no reviewable changes (4)
  • apps/docs/src/data/components/collapse.data.ts
  • apps/docs/src/utils/dropdownCommon.ts
  • apps/docs/src/data/components/offcanvas.data.ts
  • apps/docs/src/utils/popover-shared.ts
🧰 Additional context used
📓 Path-based instructions (1)
apps/docs/src/data/components/*.data.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/docs/src/data/components/*.data.ts: When adding or modifying component props, events, or slots, ALWAYS update the corresponding .data.ts file in apps/docs/src/data/components/
Documentation format in .data.ts files must match TypeScript interfaces exactly (props, emits, slots definitions)

Files:

  • apps/docs/src/data/components/toast.data.ts
  • apps/docs/src/data/components/alert.data.ts
🧠 Learnings (4)
📚 Learning: 2025-08-19T14:23:46.775Z
Learnt from: xvaara
PR: bootstrap-vue-next/bootstrap-vue-next#2732
File: packages/bootstrap-vue-next/CHANGELOG.md:35-41
Timestamp: 2025-08-19T14:23:46.775Z
Learning: In the bootstrap-vue-next repository, CHANGELOG.md files (e.g., packages/bootstrap-vue-next/CHANGELOG.md) are autogenerated and should be ignored in reviews; do not propose edits for them.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
📚 Learning: 2025-06-26T19:46:19.333Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:0-0
Timestamp: 2025-06-26T19:46:19.333Z
Learning: BTooltip is a very thin wrapper around BPopover in bootstrap-vue-next. There is no separate `useTooltipController` composable - the `usePopoverController` composable can be used to programmatically control both popovers and tooltips.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('tooltip') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this inheritance mechanism.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('popover') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this prop spreading/inheritance mechanism.

Applied to files:

  • apps/docs/src/docs/migration-guide.md
🧬 Code graph analysis (2)
apps/docs/src/data/components/toast.data.ts (3)
apps/docs/src/utils/showHideData.ts (1)
  • buildDismissibleEmits (176-206)
apps/docs/src/types/index.ts (1)
  • EmitRecord (30-30)
packages/bootstrap-vue-next/src/types/ComponentEmits.ts (1)
  • BToastEmits (42-45)
apps/docs/src/data/components/alert.data.ts (1)
apps/docs/src/utils/showHideData.ts (1)
  • buildDismissibleEmits (176-206)
🪛 LanguageTool
apps/docs/src/docs/components/toast.md

[grammar] ~68-~68: Use a hyphen to join words.
Context: ... method, and the appearance of a ticking down progress bar is a "nice-to-have". A...

(QB_NEW_EN_HYPHEN)


[grammar] ~68-~68: Use a hyphen to join words.
Context: ...a "nice-to-have". Although it is not out of the box behavior by Bootstrap, its be...

(QB_NEW_EN_HYPHEN)


[grammar] ~68-~68: Use a hyphen to join words.
Context: ...nice-to-have". Although it is not out of the box behavior by Bootstrap, its behav...

(QB_NEW_EN_HYPHEN)


[grammar] ~68-~68: Use a hyphen to join words.
Context: ...-to-have". Although it is not out of the box behavior by Bootstrap, its behavior ...

(QB_NEW_EN_HYPHEN)


[style] ~90-~90: Consider using “incomplete” to avoid wordiness.
Context: ...disabilities. The following list, while not complete, provides general guidelines when using...

(NOT_ABLE_PREMIUM)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (12)
apps/docs/src/utils/showHideData.ts (3)

5-12: LGTM! New cancel emit properly defined.

The cancel emit is correctly defined with BvTriggerableEvent type and clear description. This aligns with the common event pattern used across dismissible components.


40-47: LGTM! New ok emit properly defined.

The ok emit is correctly defined with BvTriggerableEvent type and clear description, consistent with the cancel emit.


172-206: LGTM! buildDismissibleEmits consolidates common emit patterns effectively.

The new buildDismissibleEmits function properly consolidates dismissible component emits (show/hide lifecycle + close/countdown) and follows TypeScript best practices with const assertion. The JSDoc comment clearly documents its purpose for BAlert and BToast.

apps/docs/src/docs/components/toast.md (1)

86-122: LGTM! Comprehensive accessibility guidance.

The new "Accessibility tips" section provides thorough and practical guidance covering role/aria-live usage, page-load behavior, keyboard access, reading time calculations, and toast proliferation. This significantly improves the documentation quality.

apps/docs/src/data/components/alert.data.ts (2)

10-10: LGTM! Import updated to use consolidated dismissible emits.

The change from showHideEmits to buildDismissibleEmits correctly adopts the new utility function that consolidates dismissible component emit patterns.


22-40: LGTM! Props expanded with new close button and progress controls.

The additional picked props (closeClass, closeContent, closeLabel, closeVariant, interval, isStatus, progressProps, showOnPause) properly expose the new dismissible component functionality from commonProps. As per coding guidelines, this correctly updates the .data.ts file to match component interface changes.

Based on learnings

apps/docs/src/utils/commonProps.ts (2)

461-480: LGTM! Close button props properly defined.

The new close button props (closeClass, closeContent, closeLabel, closeVariant) are correctly typed and documented. The closeVariant uses ButtonVariant | null as expected for button variant props.


481-506: LGTM! Countdown and progress props properly defined.

The new props for countdown behavior (interval, isStatus, showOnPause) and progress bar configuration (progressProps) are correctly typed with appropriate defaults and clear descriptions. The interval type correctly accepts either a number (milliseconds) or the string literal "requestAnimationFrame".

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

11-11: LGTM! Import updated consistently with alert component.

The change from showHideEmits to buildDismissibleEmits maintains consistency across dismissible components.


24-39: LGTM! Props surface expanded with dismissible controls.

The additional picked props align with the commonProps additions and maintain consistency with BAlert. As per coding guidelines, this properly updates the .data.ts file to reflect component interface changes.

Based on learnings


73-82: LGTM! update:model-value emit correctly documents boolean | number type.

The explicit override for update:model-value properly documents that BToast accepts both boolean (visibility) and number (countdown milliseconds) types. This addresses the past review concern about type accuracy.


84-172: LGTM! Comprehensive slot definitions with consistent scope.

All three slots (default, title, close) are thoroughly documented with consistent scope data (id, show, hide, toggle, active, visible), providing clear guidance for slot usage.

@dwgray dwgray requested a review from VividLemon October 24, 2025 19:52
@VividLemon VividLemon merged commit 9eae49b into bootstrap-vue-next:main Oct 26, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 10, 2025
6 tasks
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Nov 30, 2025
* upstream/main: (28 commits)
  fix(BToggle)! Remove redundant attribute cleanup & update docs for accessibility attributes on show/hide components (bootstrap-vue-next#2918)
  chore: release main (bootstrap-vue-next#2912)
  fix: allow custom component props in orchestrator create methods with type safety (bootstrap-vue-next#2922)
  fix(BModal): prevent focus trap error when no tabbable elements exist (bootstrap-vue-next#2864)
  Update package description for clarity (bootstrap-vue-next#2917)
  Update project description for clarity and detail
  test: add event emission tests for BTable and BTableLite (bootstrap-vue-next#2915)
  fix(BTableLite): Use primary key to persist row-details state when items change (bootstrap-vue-next#2871)
  chore: release main (bootstrap-vue-next#2896)
  feat(BTable): add configurable debouncing
  ci: Add publint to the build process (bootstrap-vue-next#2909)
  docs(Offcanvas): Parity pass (bootstrap-vue-next#2900)
  fix(directives): Robustness fixes for directives (bootstrap-vue-next#2906)
  docs(BFormInput): document @wheel.prevent for disabling mousewheel events (bootstrap-vue-next#2903)
  fix(typings): Fix paths to `*.d.mts` files (bootstrap-vue-next#2907)
  feat: add name and form props to BFormRating for form submission (bootstrap-vue-next#2895)
  docs: refactor docs to avoid duplication and boilerplate code (bootstrap-vue-next#2891)
  docs(BToast): Parity (bootstrap-vue-next#2887)
  docs(BModal): fix attribute to hide footer (bootstrap-vue-next#2888)
  docs(BPlaceholder): Parity pass (bootstrap-vue-next#2886)
  ...
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.

2 participants