Skip to content

[3.x] Copy Blade files on installation#1118

Merged
taylorotwell merged 1 commit intomasterfrom
blade-component-ownership
Aug 15, 2022
Merged

[3.x] Copy Blade files on installation#1118
taylorotwell merged 1 commit intomasterfrom
blade-component-ownership

Conversation

@jessarcher
Copy link
Member

@jessarcher jessarcher commented Aug 10, 2022

This PR updates Jetstream so that it copies the Livewire components on installation to make it more like the Vue stack, and more like Breeze.

I've placed them in resources/views/components instead of resources/views/vendor/jetstream/components where they are currently published, to give the user a better sense of ownership over the components, and to leverage Laravel's anonymous components. This also means the jet- prefix is no longer used, but I think that's a good thing.

Finally, I've also made it copy the email views on installation for both stacks so there are now no resources that aren't copied on installation. I've placed them in resources/views/emails rather than resources/views/vendor/jetstream/mail for the reasons previously mentioned. I've used emails instead of mail to match the Laravel docs (here and here).

I've targetted master because I believe it is a breaking change to remove the ability for existing Jetstream users to publish the views.

@jessarcher jessarcher force-pushed the blade-component-ownership branch from f8eb142 to 35945af Compare August 10, 2022 07:02
@jessarcher jessarcher changed the base branch from 2.x to master August 12, 2022 00:55
@jessarcher jessarcher marked this pull request as ready for review August 12, 2022 01:48
@taylorotwell taylorotwell merged commit 2dc1e91 into master Aug 15, 2022
@taylorotwell taylorotwell deleted the blade-component-ownership branch August 15, 2022 15:11
@taylorotwell
Copy link
Member

@jessarcher thanks - will we need any docs changes here?

@jessarcher
Copy link
Member Author

@taylorotwell indeed! I have created a draft PR at laravel/jetstream-docs#70 to add docs for 3.x

@jessarcher jessarcher mentioned this pull request Jan 27, 2023
@ghost
Copy link

ghost commented Feb 21, 2023

No offense but the prefix for jetstream components was very handy since it is package specific. Whitout prefix, given that they are very generically named, just copying them in the resources/views/components potentially overwrites any user / project components which were already there. It's just happened to me... So now either I move all of my own under new namespace/folder or move again all of the Jetstream components...

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