Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 15, 2025

The issue was that multiple modals rendered through useModal and BApp had noticeable delays due to forced transitions in BOrchestrator. The TransitionGroup with name="b-list" applied a 0.5s cubic-bezier transition to all orchestrated elements (modals, toasts, popovers), even when noAnimation=true was set on individual modals.

Root Cause

The b-list transition was originally intended for toast animations but was being applied globally to all elements in the orchestrator, causing unwanted delays when stacking multiple modals.

Solution

Made the transition name conditional based on the content type:

<TransitionGroup
  :name="
    items?.filter((el) => el.position === key)?.some((el) => el.type === 'toast')
      ? 'b-list'
      : undefined
  "
>

This ensures:

  • Modal elements: No transition name (eliminates animation delays)
  • Toast elements: Keep "b-list" transition (preserves existing smooth animations)
  • Mixed containers: Only containers with toast items get the transition

Testing

Added comprehensive unit tests to verify the conditional behavior works correctly for different combinations of modal and toast elements. Manual testing confirms modals now open instantly without delays while toast animations remain smooth.

![Multiple Modal Test](https://github.com/user-attachments/assets/c91eecc6-7bb9-40d6-84f0-a55b6253031c)

Fixes #2839.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@bolt-new-by-stackblitz
Copy link

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

- Modified BOrchestrator.vue to only apply 'b-list' transition name for toast items
- Modal elements no longer have forced transition delays
- Added comprehensive tests to verify conditional transition behavior
- Maintains toast animation functionality while fixing modal performance

Co-authored-by: xvaara <[email protected]>
Copilot AI changed the title [WIP] useModal and BApp, delay in rendering multiple modals Fix modal transition delays by making TransitionGroup name conditional Sep 15, 2025
Copilot AI requested a review from xvaara September 15, 2025 14:49
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 16, 2025

bsvn-vite-ts

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

commit: f9cc913

@xvaara xvaara marked this pull request as ready for review September 16, 2025 15:15
@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

@xvaara xvaara merged commit af49d33 into main Sep 16, 2025
8 checks passed
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Oct 11, 2025
* upstream/main:
  chore: release main (bootstrap-vue-next#2868)
  fix(useModalOrchestrator): circular dependency (bootstrap-vue-next#2874)
  docs(BModal): Parity pass (bootstrap-vue-next#2866)
  docs: Enable directly loading examples into StackBlitz (bootstrap-vue-next#2869)
  fix(BApp): wrap our test app in BApp in main.ts to enable easy verification of useModal, etc. (bootstrap-vue-next#2865)
  export useScrollLock() (bootstrap-vue-next#2854)
  chore: release main (bootstrap-vue-next#2858)
  fix(BToggle): stop looking for missing targets after directive is unmounted (bootstrap-vue-next#2857)
  chore: release main (bootstrap-vue-next#2851)
  Fix modal transition delays by making TransitionGroup name conditional (bootstrap-vue-next#2845)
  chore: release main (bootstrap-vue-next#2842)
  fix(BTable): events being wrongly stopped when sent from elements inside TRs (bootstrap-vue-next#2841)
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.

useModal and BApp, delay in rendering multiple modals

2 participants