-
-
Notifications
You must be signed in to change notification settings - Fork 173
fix(BApp): wrap our test app in BApp in main.ts to enable easy verification of useModal, etc. #2865
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
Conversation
|
|
WalkthroughBApp usage was removed from App.vue and reintroduced at the bootstrap level. main.ts now defines a Wrapper component that renders BApp as the root and places App in its default slot, then mounts Wrapper. Imports were adjusted accordingly, and BApp is now exported from ./index. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Browser
participant VueApp as Vue App (Wrapper)
participant BApp as BApp (Root)
participant App as App (Content)
User->>Browser: Load page
Browser->>VueApp: Create and mount Wrapper
VueApp->>BApp: Render BApp as root
BApp->>App: Render App in default slot
App-->>BApp: Provide content (BContainer/BRow/BCol)
BApp-->>VueApp: Composed root hierarchy ready
VueApp-->>Browser: Mounted application
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)packages/bootstrap-vue-next/src/App.vue📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (6)📓 Common learnings📚 Learning: 2025-09-12T14:46:49.416ZApplied to files:
📚 Learning: 2025-09-12T14:46:49.416ZApplied to files:
📚 Learning: 2025-09-12T14:46:49.416ZApplied to files:
📚 Learning: 2025-09-12T14:46:49.416ZApplied to files:
📚 Learning: 2025-09-12T14:46:49.416ZApplied to files:
⏰ 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)
🔇 Additional comments (4)
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. Tip 🧪 Early access (models): enabledWe are currently testing Sonnet 4.5 code review models, which should lead to better review quality. However, this model may result in higher noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this 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 fixes the test app structure to enable proper testing of composables like useModal that require being wrapped in a BApp component. The change moves the BApp wrapper from App.vue to main.ts, creating a wrapper component that renders the main app inside BApp.
Key changes:
- Restructures the test app to wrap the entire application in
BAppat the root level - Enables testing of composables that depend on
BAppcontext (likeuseModal) - Maintains the same functionality while improving developer experience
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/bootstrap-vue-next/src/main.ts | Creates a wrapper component that renders App inside BApp and uses it as the root component |
| packages/bootstrap-vue-next/src/App.vue | Removes BApp wrapper and import since it's now handled at the application level |
commit: |
* 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)
Describe the PR
While investigating #2860 I noticed that the way we have our test app structured doesn’t work if you wanted to import
useModalor and of the other composables that depend on being contained by theBAppThis is one way to fix the issue. Another would be to add a component below our App and do the testing in the component (that’s basically what our template for bug reports does).
This seemed a little easier for day-to-day work, but happy to implement the other if anyone has a strong preference.
Small replication
Import
useModalin our test app and you’ll see an error that it must be contained.PR checklist
What kind of change does this PR introduce? (check at least one)
fix(…)feat(…)fix(…)docs(…)The PR fulfills these requirements:
CHANGELOGis 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 deniedSummary by CodeRabbit