Skip to content

RFC: Rethink the composables, createBootstrap and how we inject/provide #2708

@xvaara

Description

@xvaara

Clear and concise description of the problem

It's been bothering me how we inject plugins in createBootstrap and then we have multiple Orchestrators and Controller composables.

Suggested solution

plugins / default

Create a wrapping BApp component that does all of that, and offers more flexibility. You could have different defaults for part of your app.
And props to controll if we load the orchestrators, or the functionality could be inside them.

ie:

<BApp :defaults="{BModal: {class: 'bg-danger'}}">

Composables, plugins and controllers

They seem a little complex.

useToast doesn't do anything that useToggle doesn't do.

We should rename all the useXXXController to useXXX.

Do we need the plugins to put the functions to the provide? They are only used in the useXXXController so they should be there. We only need one provide for all the registries, for modal/toast/popover we could use one registry and another for useshowhide. All initialized in BApp (or failback with the createBootstrap() for those how want it)

teleports

Now that has defer we could have the teleport target inside the BApp, it doesn't need to be inside body, or child of body.

@VividLemon @dwgray any thoughts?

Alternative

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions