-
-
Notifications
You must be signed in to change notification settings - Fork 149
draft of BApp #2732
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
base: main
Are you sure you want to change the base?
draft of BApp #2732
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@xvaara, I really like this for the core setup. It's what I would use in my app, given a choice between this and the current plugin. The main question I have is about tree shaking. As @VividLemon mentioned previously, there is some segment of our user base that is quite concerned about the deployed size of BSVN. If we eventually deprecate the plugins and only allow this method of installation, do we effectively disable tree shaking? |
I think the best solution to this is to effectively give people the tools to build their own "bapp" and document how to do it well |
teleportTo: undefined, | ||
defaults: undefined, | ||
mergeDefaults: false, | ||
deepMerge: false, |
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.
Maybe mergeDefaults is boolean | function
to where the function is the algorithm to use for merging?
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.
I generally dislike props that just effect the behavior of other props. Begs the question why it's not just an object
BApp Component
The
BApp
component is the new recommended way to configure bootstrap-vue-next. It replaces the plugin-based approach and provides better defaults management and orchestrator integration.Features
Basic Usage
Configuration
Setting Component Defaults
Advanced Defaults Configuration
Orchestrator Configuration
Disabling Orchestrators
RTL Configuration
Migration from Plugins
Before (Plugin-based)
After (BApp-based)
Props
defaults
Partial<BvnComponentProps>
undefined
mergeDefaults
boolean
false
deepMerge
boolean
false
teleportTo
TeleportProps['to']
undefined
noModals
boolean
false
noToasts
boolean
false
noPopovers
boolean
false
noOrchestrator
boolean
false
appendToast
boolean
false
inhert
boolean
false
rtl
boolean | RTLConfig
false
RTL Configuration Object
Composables
When using
BApp
, the following composables work without requiring plugin installation:useToastController()
- Create and manage toasts programmaticallyuseModalController()
- Create and manage modals programmaticallyusePopoverController()
- Create and manage popovers programmaticallyInternal Features
The
BApp
component automatically provides several internal services:Default Merging Behavior
The component supports three modes for handling defaults:
defaults
prop completely replaces any existing defaultsmergeDefaults: true
): Shallow merge with existing defaultsmergeDefaults: true, deepMerge: true
): Deep merge nested objectsTeleporting
By default, orchestrators render inline. Use
teleportTo
to render them elsewhere:Backward Compatibility
The
BApp
component is fully backward compatible with existing plugin-based setups. You can gradually migrate by:BApp
to your root componentBApp
propsThe plugins will show deprecation warnings but continue to work until removed in a future version.
Notes
BApp
or orchestrator should be active at a time per applicationteleportTo
is specifiedPR checklist
What kind of change does this PR introduce? (check at least one)
fix(...)
feat(...)
fix(...)
docs(...)
The PR fulfills these requirements:
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