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

Tweaks to override-solidus-assets.md #2482

Merged
merged 2 commits into from
Jan 17, 2018
Merged

Conversation

jhawthorn
Copy link
Contributor

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).

Copy link
Member

@tvdeyen tvdeyen left a 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.
Copy link
Member

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?

Copy link
Contributor Author

@jhawthorn jhawthorn Jan 12, 2018

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).

Copy link
Contributor

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).
@jhawthorn jhawthorn merged commit 5db4777 into solidusio:master Jan 17, 2018
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