-
Notifications
You must be signed in to change notification settings - Fork 140
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
Correctly call the tailwindcss preset if the auth flag is not passed #89
Conversation
Due to the removal of `tailwindcss-auth` macro the `tailwindcss` macro will always run `TailwindCssPreset::installAuth()`. This is in large part because how macro's work and the `UiCommand::macro('tailwindcss')` getting overwritten by `AuthCommand::macro('tailwindcss')`. This commit assumes that just having one macro of `tailwindcss` is the acceptable use moving forward. With that said, this commit check the command option auth flag and if it's true will correctly install all the auth presets. This commit also removes the call to the `install()` method on the TailwindCssPreset::installAuth method as this should always be called on the macro.
Hum. I'm not sure to understand all of this right now, but I would not merge that as this is not the standard behaviour of laravel/ui and the way that standard presets are implemented. Maybe there is a bug in Laravel/ui, but this is not to this package to fix it. Coming back with more information. |
OK, I've seen where the problem comes from. Actually there are both different, coming from laravel/ui. I've opened issues https://github.com/laravel/ui/issues/71 and https://github.com/laravel/ui/issues/72. In any case, I would not advice to merge this PR, as it's just a patch for bugs in laravel/ui. |
Should we just go back to This seems like a problem with macros in general, so doesn't make sense to try and fix it in |
I'll creat a new pull request to add back the |
And I'll tell you as soon as I have some good news from Laravel team. Because the state for now is (from Taylor):
So it can be quite a change for the plans of this package, and of all laravel-frontend-presets in general. 😅 |
Ok, after some exchanges with Dries (where it says they are supposed to work on laravel/ui later so no change for now), I withdraw my message, and I think this PR should be accepted and merged. And I personally think the Thanks anyway for the work on this package, and sorry for the misunderstanding. |
I've used this approach with the |
Due to the removal of
tailwindcss-auth
macro thetailwindcss
macrowill always run
TailwindCssPreset::installAuth()
. This is in largepart because how macro's work and the
UiCommand::macro('tailwindcss')
getting overwritten by
AuthCommand::macro('tailwindcss')
.This commit assumes that just having one macro of
tailwindcss
is theacceptable use moving forward. With that said, this commit check the
command option auth flag and if it's true will correctly install all the
auth presets.
This commit also removes the call to the
install()
method on theTailwindCssPreset::installAuth method as this should always be called on
the macro.