Skip to content
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

Upgrade Jetstream to the latest InertiaJS #344

Merged
merged 10 commits into from
Oct 14, 2020
Merged

Upgrade Jetstream to the latest InertiaJS #344

merged 10 commits into from
Oct 14, 2020

Conversation

claudiodekker
Copy link
Contributor

This PR updates Jetstream to use the latest version of Inertia (0.4) & Inertia Vue (0.3).

Please note: Changes in this PR rely upon the changes introduced in laravel/jetstream-js#8, meaning this PR is breaking right now.

onSuccess: () => {
if (! this.createApiTokenForm.hasErrors()) {
this.displayingToken = true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still called onSuccess even if there are validation errors? I guess because it's a redirect on the server side?

Copy link
Contributor Author

@claudiodekker claudiodekker Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it still gets called. onSuccess in Inertia doesn't have much to do with the HTTP request itself succeeding, but instead means that a valid (usable) Inertia response came back. https://inertiajs.com/manual-visits#promise-deprecation

Server-side redirects don't really affect this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. Success = successful Inertia visit. It's like a then() before.

@taylorotwell
Copy link
Member

@claudiodekker I have released the jetstream-js PR as 1.0.0. We can update the master branch of this repository to install ^1.0.0 of laravel-jetstream in the InstallCommand so that the correct version is pulled in.

@taylorotwell
Copy link
Member

I have made that change.

@claudiodekker
Copy link
Contributor Author

Dude, you're ⚡ 🤣

@taylorotwell
Copy link
Member

Just noticed. Doesn't this entire PR need to go to master branch?

@taylorotwell taylorotwell changed the base branch from 1.x to master October 14, 2020 20:44
@taylorotwell
Copy link
Member

@claudiodekker In light of changing the branch to master, we'll now need to update the Inertia authentication pages you worked on.

@claudiodekker
Copy link
Contributor Author

claudiodekker commented Oct 14, 2020

@taylorotwell Yeah, sure, no worries.. I'll get right on it 👍

@claudiodekker
Copy link
Contributor Author

@taylorotwell Done.

@taylorotwell
Copy link
Member

Thanks!

@taylorotwell taylorotwell merged commit a573f4a into laravel:master Oct 14, 2020
@claudiodekker claudiodekker deleted the upgrade-inertia branch October 14, 2020 21:33
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.

None yet

3 participants