-
Notifications
You must be signed in to change notification settings - Fork 116
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
Write test to make sure asset naming matches component #1540
Conversation
🦋 Changeset detectedLatest commit: 303617a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I'm not sure I'm in favor of this change. I learned recently that web components are required to include a hyphen in their names, eg. nav-list
instead of navlist
. Up until now it hasn't been a problem, but I was bitten last week by banner
and flash
. Apparently it's common to prefix single-word web component names with x-
, so the custom element names are x-banner
and x-flash
. We have an eslint rule that forces the element name to match the file name, so I had to use x_banner.ts. I really don't want to have to name the component x_banner.rb and x_banner.html.erb too 😓
I can drop the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'm cool with that. We might also consider relaxing the eslint rule.
Description
This PR introduces a test to make sure that assets are named to match the component ruby file. This follows convention setup for view components and also allows us to write tests around this convention to match assest with their component.
Integration
no
Merge checklist