-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Tweaks to override-solidus-assets.md #2482
Conversation
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.
I think we can remove the first addition
@@ -24,7 +24,8 @@ might not be effective for the next. | |||
|
|||
If you want to tweak a CSS definition or change the way a particular JavaScript | |||
methods works, you can override it by redefining the definition in a file in | |||
your application's `app/assets` tree. | |||
your application's `app/assets` tree, although this isn't guaranteed to work in | |||
future versions of Solidus. |
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.
As far as I read this paragraph it handles overriding a single CSS rule or JS function in a separate file, not overwriting the defining file itself. This is handled below. And overwriting things like this is always supported, no? Or am I misreading something?
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.
You're right. I was confused about what this was describing. We should probably change this section (in a future PR) because "redefining" isn't an accurate description of what happens when adding additional CSS (and is likely misleading for JS too).
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.
👎 My bad.
At some point in the future it's possible we will use an asset bundler other than sprockets (like webpack or rollup). If we do so we won't be able to support sprocket's view-like file lookup and overriding (and it is an unusual thing to support for JS in the first place).
Fixes a JS typo and warns about view-like overriding of files.
At some point in the future it's possible we will use an asset bundler other than sprockets (like webpack or rollup). If we do so we won't be able to support sprocket's view-like file lookup and overriding (and it is an unusual thing to support for JS in the first place).