You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Accessing metafield values in a theme is kind of complicated.. There's probably something smart we can do that would make it super easy to have code completion for those in a shop-aware scenario.
Describe the solution you'd like
Use dependency injection of some kind of data structure so that the browser and node environments have access to a shop's metafield config
Wire the metafield definitions into the type system so that code completion works as though they were normal types.
It should be opt-in
It should be as easy as logging in to get the stuff we need. (think get approval and we do the graphql call for you)
Maybe a CLI command. Maybe reuse CLI auth. Maybe dump to file (so that it's usable in CI).
Describe alternatives you've considered
Using dependency injection so that the core does the graphql calls to get the stuff. I don't like that because it creates a network dependency and error handling can get weird. I'd like to be able to keep running theme-check in CI without making API calls. Probably something like dumping the definitions to a file and providing those. In web, we could probably do the graphql query to get them.
Tasks
Allow VScode to parse and auto-complete metafield definitions
Allow OSE to parse and auto-complete metafield definitions
Create CLI command to fetch metafield definitions and store it in the themes directory
Ensure themes directory does not commit and push the file into the repo
Fetch the metafield definitions on VScode startup
Questions
How do we want to handle when the CLI isn't logged into an shop?
Should we try to use Theme Access app if they have store + password defined in their environment file?
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Accessing metafield values in a theme is kind of complicated.. There's probably something smart we can do that would make it super easy to have code completion for those in a shop-aware scenario.
Describe the solution you'd like
Describe alternatives you've considered
Tasks
Questions
The text was updated successfully, but these errors were encountered: