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

You need to write a letter before writing settings #183

Open
MaksymKurniy opened this issue Jan 24, 2024 · 4 comments
Open

You need to write a letter before writing settings #183

MaksymKurniy opened this issue Jan 24, 2024 · 4 comments
Labels

Comments

@MaksymKurniy
Copy link

In the schema, when I try to add a checkbox, I need to write some letter first and then my request, if I immediately write a checkbox, I will get the following result:
image
but if I write like this, it will find everything, but the first letter will remain
"ccheckbox"
image
it would also be very cool if a translation line was added to the label, something like this: "t:sections.collage.blocks.collection.settings.test.label"

@panoply
Copy link
Owner

panoply commented Jan 24, 2024

Hey @MaksymKurniy

You can have completions within schema regions show up without typing by triggering the completions list using the following key mapping:

Ctrl + Space

Here is an attached video of that in action:

issue.mp4

In regards to the translation schema references, IIRC I have that either built in already or have it planned but its been a few months since I looked at this project. If I haven't already built in support, I can prob do that at some point. Whatever the case may be, ensure you have linked your file paths.

{
  "engine": "shopify",
  "files": {
    "locales": "locales/en.default.json" // ensure your path is passed here
   }
 }

As aforementioned, I cannot guarantee its supported yet, maybe I only built support in for .schema.json translation for | t filters.

@panoply
Copy link
Owner

panoply commented Jan 24, 2024

Oh.. Wait. Now I see what you mean, you want the completions to apply when you type raw into the JSON schema regions and upon hitting enter/return, the previous entered keys (in this case c) remove and the snippet invokes.

I can support that, I'll make a note to add it in the next time I work on project.

@panoply panoply added the 🙏🏻 Feature Request Feature Requests label Jan 24, 2024
@MaksymKurniy
Copy link
Author

MaksymKurniy commented Jan 25, 2024

If I want to call a checkbox snippet, I need to write some letter and after it start writing che... so that a checkbox is offered to me. If I immediately start writing che... without a letter at the beginning, the first letter will be ignored and the sentences will start with the letters HE. and if you write CCHE or QCHE and select the checkbox, the first letter will remain.
example

@MaksymKurniy
Copy link
Author

| t works fine.
I mean, when a snippet is added, for example the same checkbox, it is possible to immediately write its id and label. it would be cool if a line was added to the label depending on where the snippet is already located.
example:

{
  "name": "t:sections.image.name",
  "settings": [
     {
      "type": "checkbox",
      "id": "|",
      "label": "t:sections.image.settings.|.label"
     }
  ]
}

and if i type test i get

{
  "name": "t:sections.image.name",
  "settings": [
     {
      "type": "checkbox",
      "id": "test",
      "label": "t:sections.image.settings.test.label"
     }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants