-
Notifications
You must be signed in to change notification settings - Fork 43
Support for SVGs and images in theme-graph #988
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
base: main
Are you sure you want to change the base?
Conversation
LiquidFilter: (node, ancestors) => { | ||
if (node.name === 'asset_url') { | ||
if (['asset_url', 'asset_img_url', 'inline_asset_content'].includes(node.name)) { |
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.
These are the only filters i knew that reference images or svgs that are in assets folder, let me know if i missed anything
@@ -136,13 +159,29 @@ export const enum LiquidModuleKind { | |||
Template = 'template', | |||
} | |||
|
|||
export const SUPPORTED_ASSET_IMAGE_EXTENSIONS = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'heic']; |
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.
Im not sure if we support other image assets in the asset folder, but could add more if anyone knows more
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.
Would we ever want .ico
?
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.
Sweet! 🎩 'd the changes and could see dependencies including images.
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.
Design is sound!
| JSONSourceCode | ||
| LiquidSourceCode | ||
| JsSourceCode | ||
| CssSourceCode | ||
| ImageSourceCode | ||
| SvgSourceCode |
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.
Should probably type alias this union :P
What are you adding in this PR?
Fixes #981
Tophat
Before you deploy
changeset