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

[2.x] Support both Alpine V2 and V3 #813

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

calebporzio
Copy link
Contributor

Problem scenario:

  • Someone updates Jetstream to the latest version that supports Alpine V3
  • They don't update their Alpine version to V3 (because package.json/app.js doesn't get automatically updated)
  • Jetsream is now broken in the following two ways:
    • The top right menu doesn't work because it uses @click.outside which is new in V3
      image
    • The little "Saved." indicator doesn't transition out because it uses x-transition... which is new in V3
      image

Solution:

  • Use .away instead of .outside - they are aliases and both exist in V2 and V3
  • Include the legacy x-show.transition... as well as the new x-transition... helpers. Each will work on their respective versions without causing breakages.

After this PR, all Jetsream stubs will be upgrade safe and support any version of Alpine a project is using.

@driesvints driesvints changed the title Support both Alpine V2 and V3 [2.x] Support both Alpine V2 and V3 Jun 24, 2021
@driesvints
Copy link
Member

Thanks @calebporzio. We can probably move to v3 entirely in Jetstream v3 (master branch). Once this PR is merged and merged into master we can do the changes for v3 there.

@taylorotwell taylorotwell merged commit d212963 into laravel:2.x Jun 24, 2021
@calebporzio
Copy link
Contributor Author

Ok, will PR - thanks @driesvints!

@calebporzio
Copy link
Contributor Author

Looking at master: looks like I don't have to.

@driesvints
Copy link
Member

@calebporzio I just merged 2.x into master 👍

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.

3 participants