-
Notifications
You must be signed in to change notification settings - Fork 0
Several changes and improvements to add to Shopify#1403 #1
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
Conversation
_tags/template.md
Outdated
| <pre class="highlight"> | ||
| <code>{% raw %} | ||
| {% raw %} | ||
| ```liquid | ||
| {% raw %}{%{% endraw %} raw {% raw %}%}{% endraw %} | ||
| {%- raw -%} | ||
| In Handlebars, {{ this }} will be HTML-escaped, but | ||
| {{{ that }}} will not. | ||
| {% endraw %} | ||
| {% endraw %}</code> | ||
| </pre> | ||
| {% endraw %} | ||
| {% raw %}{%{% endraw %} endraw {% raw %}%}{% endraw %} | ||
| ``` |
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.
This could be the most peculiar change in this entire PR, IMO - rendering an example of the raw tag using actual raw tags. Someone thought it couldn't be done. I did it! 😆
Another way to do it is: {{ "%7B%+raw+%%7D" | url_decode }}. If there was an unescape filter (there isn't!), that would've been a third way with {% raw %}
|
Hi again @EricFromCanada in the latest commit fc10dfb, I made changes to categorize the filters using a Also notifying @dylanahsmith to please see the way I categorized filters without changing the URLs: https://adtc.github.io/liquid/ RE: Shopify#1403 and Shopify#1409 PS: It might be best to rebase when accepting PR. Just a suggestion. |
2c8cc97 to
35b9743
Compare
|
@EricFromCanada I think I'm done with this set of changes. Hope you can take a look and review please? |
f4a6868 to
b98d3d6
Compare
In "Whitespace control" page, a new section explains how you can use the liquid tag and echo tag to more elegantly avoid whitespace starting from Liquid 5.0.0 A note has also been added to disclaim that the example output boxes may not have the exact whitespace output expected from the corresponding example input.
Many pages in the Filter section have several Input/Output boxes unnecessarily. Wherever possible, they were consolidated into one set of boxes only. Some documentation have also been clarified further and expanded where lacking.
In Template, some titles are better worded, and some descriptions are clarified. Unnecessary code blocks are condensed. In Variable, real code is used to render the examples instead of hard-coded text.
A bit of magic* splits the filters into categories using a new "category" key in the filter markdown files. All the files stay where they are, and all the URLs stay exactly the same! * The trick is in the various array filters! Note: All filters must have categories. The "aaa" category is a special category that will put those filters at the top under "Filters".
I think these are better taken out of the String Filters category (which is already lengthy) because they don't belong there. In String category, all filters change the final output of the string. But escape belongs with url_encode because they don't change the final output of string (only its encoding). As for split, this actually better belongs in the Array Filters category because it splits a string into an array. Those looking for this filter are more likely to be thinking about array manipulation rather than string manipulation.
Scrollbar now scrolls over to the actual link and positions it at the center of sidebar. This is less jarring that scrolling to the section header at the top. The logo is also moved into the scrollable sidebar but made sticky through CSS. Tested working on both desktop and mobile.
It looked like the filter subheadings like Array Filters were new separate sections in the menu, when it should be a subsection under Filters. This fixes it by changing the boldness and adding an indicative arrow next to the header so that it looks different.
Also apply some DRY principles and minification to the Javascript The filter type links use Javascript to scroll the menu to the filter section. On mobile it will also open the menu. Pretty cool, huh?
It seems in mobile browsers, the padding is not enough to show the menu properly. The auto-hiding location bar of the browser pushes the menu down when visible. It looks better with double padding on both desktop and mobile.
A similar expanded note is already in "render with" so just making sure it's also in "render for".
This also removes the emphasised note that is now unnecessary.
|
Oops! Forgot to close this 😄 Please refer the PR mentioned above. |

I request you to add these commits to Shopify#1403 by merging this PR. I think I'd prefer using "rebase merge" (to avoid an ugly merge commit) but it's up to you.
Summary of changes is in each commit message. Please browse the changed documentation here: https://adtc.github.io/liquid/
Review and comments appreciated!