Conversation
|
I am in total agreement with the general rule proposed here, and the listed of exceptions provided. |
|
Eventually we could make a case that |
|
Ten snippets lighter! I'm all for this, and the list of exceptions. |
|
Another situation where snippets are needed now is when you have theme settings that let you populate a sidebar or a homepage with “widgets” in the order that you want. Like we do in the Solo theme. Perhaps there's another way to handle that fine-grained control that we obtain with snippets then. Solo's index template contains this: |
|
I think that's another conversation to be had for sure, but not handled in this PR. Right now it's the best solution I can think of to handle the ordering of settings like that. |
|
Sorry, not the right place for sure. |
|
Using #361 for this now. |
Here is an experimental PR that places all code from one-use snippets in line.
Pros of this approach:
/snippets{{ powered_by_link }}. Timber used to have it insnippets/footer, rather thanlayouts/theme- the only place it is ever usedCons:
My preference would be to take any snippet that is only used once and move it inline. Exceptions would be:
These make the main layout file much longer than it needs to be, as seen in this PR. These are never going to be touched by a merchant and therefor offer no value in the main layout file.
@mpiotrowicz @carolineschnapp @fredryk @stevebosworth