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

Metafield completion #502

Open
charlespwd opened this issue Sep 25, 2024 · 0 comments
Open

Metafield completion #502

charlespwd opened this issue Sep 25, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@charlespwd
Copy link
Contributor

charlespwd commented Sep 25, 2024

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.

Additional context
Add any other context or screenshots about the feature request here.

@charlespwd charlespwd added the enhancement New feature or request label Sep 25, 2024
@aswamy aswamy self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants