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] Remove "Jet" component prefix #1117

Merged
merged 4 commits into from
Sep 5, 2022
Merged

Conversation

jessarcher
Copy link
Member

@jessarcher jessarcher commented Aug 10, 2022

Continuing from #1110, this PR removes the "Jet" prefix from the component imports in the Vue stack to give users a better sense of ownership over the scaffolding.

This meant that some components were now a single word, which goes against the Vue style guide. I asked Evan You whether he'd still advocate against this, and he responded:

Not as strictly, but I’d still avoid names that overlap with known native elements.

After the rename, there were three components that overlapped with native elements, which I've renamed as follows:

  • Button -> PrimaryButton (this creates symmetry with the SecondaryButton and DangerButton components)
  • Input -> TextInput
  • Label -> InputLabel (this creates symmetry with the InputError component)

If this is accepted, I will update the references in the Jetstream docs.

@jessarcher jessarcher force-pushed the remove-jet-component-prefix branch from d7aeec9 to a483011 Compare September 5, 2022 05:56
@jessarcher jessarcher force-pushed the remove-jet-component-prefix branch from b595043 to a42c4e8 Compare September 5, 2022 06:47
@jessarcher jessarcher marked this pull request as ready for review September 5, 2022 06:53
@driesvints
Copy link
Member

This meant that some components were now a single word, which goes against the Vue style guide.

I feel like this is a weird rule as it's still obvious that these are components rather than native elements. But as long as we don't change the Livewire side of things, all good to me 😅

@jessarcher
Copy link
Member Author

Yeah, I agree it's a little weird. I guess because with Vue you can use kebab-case or PascalCase, and if you chose kebab-case then the single-word components could have identical names to native elements. Personally, I don't mind this and just disable that particular rule when using Vue's eslint prefix.

I wish it wasn't breaking to change the Livewire components, otherwise, I'd love to make them match.

@chrysanthos
Copy link
Contributor

Won't this just make upgrading harder for little to no benefit?

@driesvints
Copy link
Member

@chrysanthos there isn't really an upgrade path for Jetstream. It's a scaffold tool.

@chrysanthos
Copy link
Contributor

@chrysanthos there isn't really an upgrade path for Jetstream. It's a scaffold tool.

I know, and the way to go about upgrading is to manually monitor the releases for changes. This PR will make this harder for no benefit.

@driesvints
Copy link
Member

You're still talking about "upgrading" but there really isn't any such thing.

@taylorotwell taylorotwell merged commit 60f19d8 into 2.x Sep 5, 2022
@taylorotwell taylorotwell deleted the remove-jet-component-prefix branch September 5, 2022 14:26
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.

4 participants