Customizing the Settings panel (Guide Professional and Enterprise) Follow

Comments

20 comments

  • Avatar
    Brad Marshall

    Where do I find the `manifest.json` file? I thought it would be in the assets, but cannot find it.

    Thank you!

  • Avatar
    Jennifer Rowe (Edited )

    Hi Brad,

    Again, you've caught me without the doc ready! I'm working on a Export doc.

    But here's what you do:

    Click the options (gear) menu on the theme, then select Export.

    When you finished editing the manifest file, you can re-import it by clicking Import in the upper-right of the Themes page.

  • Avatar
    Jennifer Rowe

    Brad, I edited my commend to add the all-important import step, if you edit the manifest file. 

  • Avatar
    Brad Marshall

    Okay, so there is no way to modify that single file, but rather I have to export/import to modify the manifest.json. Correct? 

    Thank you for your help!

  • Avatar
    Jennifer Rowe

    That's right, Brad. You have to export the theme to modify the manifest file.

  • Avatar
    Trapta

    It will be good idea to have examples on range, and text types.

    Please also document the rules that you run.

    We noticed, if we use "list" type with only one option, manifest won't pass validation stage (while theme is being imported after upload). It took a while to find out this which I think is decision by design (i.e a list with one option shouldn't be allowed anyway).

    Thank you

  • Avatar
    Stas

    Is there a way to make a hidden type of variables? For example, it would be good to save the media queries breakpoints which are not needed to be editable in the Theming Center?

    Thanks for the great update!

  • Avatar
    Augusto Cravo Silva (Edited )

    @Trapta,

    We are woking on adding better error messages on import. These will tell you the exact reason why Import failed.

     

    @Stas,

    Our vision with the Theming Center (TC) variables is to allow less experienced people to do smaller tweaks in the theme that don't require a theme developer.

    It feels you are looking for SCSS variables :) We currently don't support SCSS compilation in TC but you can still compile SCSS into CSS offline and then import it. We have an example of that in https://github.com/zendesk/copenhagen_theme

  • Avatar
    Trapta (Edited )

    @Augusto Cravo Silva,

    I have a different update here :)

  • Avatar
    Devorah (Edited )

    I just spent a while trying to figure out why I couldn't add any new variables to my manifest.json file. Each time I got this cryptic import error:

    The property '#/settings/0/variables/0' of type object did not match any of the required schemas

    I finally figured out you can't put raw text into "label" and "description" fields. Instead you have to add a translation key to AT LEAST the default locale in the translations directory and point "label" and "description" to that newly created key.

    It would be great if you could add this caveat to the documentation - it wasn't clear.

    Thanks!

     

  • Avatar
    Jessie - Community Manager

    Thanks for the heads up on that, Devorah! I'll pass your feedback along in our Documentation team!

  • Avatar
    Brad Marshall

    I'm getting the same error:

    The property '#/settings/0/variables/0' of type object did not match any of the required schemas

    Do you really have to create a translations folder and then place all of the strings into it to get it to import correctly? That is a lot of extra work that shouldn't be required. There are examples above that do not follow this method and when I exported my theme to make alterations to it, it didn't have these translation folder/files to begin with. Would this mean I would need to export, make all of the translation changes, to get it to import again?

  • Avatar
    Augusto Cravo Silva (Edited )

    Hi @Brad,

    Sorry to hear you're experiencing issues. We need to look into improving this error message.

    What it means is that the 1st variable of the 1st group of settings is not correctly defined.

    You don't need to create translations if you do not want to provide this functionality. If we can't find a translation, we will show what is set in the manifest. However, you should be aware that the label string length is limited to 40 characters, when not using the translation file. This might be the issue. Which type of setting are you trying to add?

  • Avatar
    Brad Marshall

    I had exported the default, Zendesk-provided theme. I then modified it and then attempted to reupload it and then experienced the error. I created the translation file and it worked without any issues. Also, as an FYI, none of the label strings had more than 40 characters.

    The first variable of the first group of settings was:

    • Label: Primary Color
    • Description: Color for generic navigational elements
    • Type: color
  • Avatar
    Augusto Cravo Silva

    Hi @Brad, thanks for providing those details.

    I think we would need to have a look at the ZIP file to understand what the problem could be.

    If you are still experiencing issues, please send us a Support request with the ZIP file.

    Thanks

  • Avatar
    Joel Hellman (Edited )

    @Augusto, @Brand: I also got stuck here for a while, despite finding this thread and shortening my attribute lengths. 

    The property '#/settings/0/variables/0' of type object did not match any of the required schemas 

    In my case I discovered it was whenever I used a identifier longer than 30 chars. 

    Please add this to the documentation now, so we can skip the guesswork. It seems your schema is very restrictive (30 chars, that's fairly short) with its validation as well as its error output. Schema should be useful both to the client and server, IMO...

    And I'd like if we could allow for longer values. Guess I'm just that verbose ;)

  • Avatar
    Joel Hellman

    What is the max lengh of the 'value' property in the manifest.json file for a field of type 'text' ?

    My use case is to hold a list of comma-separated form id that my theme uses, thinking the Zendesk admin could maintain these through the theme settings, instead of editing the theme code directly, where there is always the risk they break something editing the html or javascript.

    I'm unsure how well this would scale for those accounts that have forms though, in case the value field cannot hold that much data...

  • Avatar
    Charles Nadeau

    @Joel

    I added to 30-character limit to the identifier property in the doc.

    Thanks.

  • Avatar
    Joel Hellman

    @Charles: thanks. But what about the max length of the value property for text fields?

    Also can we add to the reference table that there is a 40 char limit, unless you use translation files, i.e. as this comment from Augusto Cravo Silva explained:

    However, you should be aware that the label string length is limited to 40 characters, when not using the translation file. 

    This limit also applies to the description field.

  • Avatar
    Harjinder Dhanjal

    Thank you so much appreciated thanks

Please sign in to leave a comment.

Powered by Zendesk