Amy
Amy

Reputation: 946

How do I access the Bigcommerce Stencil theme editor from a local dev environment?

I'm editing BigCommerce's cornerstone theme template with stencil and want to view and make changes to the admin interface. Much like what's happening in this video tutorial https://www.youtube.com/watch?v=mdhSLKpTOBY&list=PLwTYtMwfzbe7EZiIWPAmPtuwRHkY7BG-0&index=9

But I'm not sure how to access the theme editor locally. I saw that the --theme-editor commands were removed from the stencil cli. It says that we should look at this documentation instead https://developer.bigcommerce.com/stencil-docs/configure-store-design-ui/store-design-overview but that doesn't show how the theme editor could be accessed from a local environment. Is this possible?

Is the only option to upload the theme and edit it from there? Has the ability to use a theme editor locally been removed?

Upvotes: 0

Views: 732

Answers (2)

Kyle
Kyle

Reputation: 192

As far as natively supported features, the Stencil CLI deprecated support for live theme editing due to it no longer matching the experience found on the platform. You can find these details on a related GitHub issue reported here: https://github.com/bigcommerce/stencil-cli/issues/601

Until this feature is reintroduced, you'll need to bundle the theme and apply it to a store to review the theme editor.

Upvotes: 1

Mikhail
Mikhail

Reputation: 900

I don't think you can access the Theme Editor from a local environment directly.

If you want to add configurable options, you would be editing schema.json and adding new sections there. In that way, you can add entirely new Text Inputs, Checkboxes, Dropdowns, that would allow store administrators to edit those entries.

The values that are being changed are located in config.json -- those are all the theme_settings that you can access inside of Handlebars, and they can also be injected into JavaScript via context.

So essentially you want to create new entries in config.json, and create new mappings in schema.json to allow those entries to be edited in the Theme Previewer. You should be able to put together how to make new sections by trying to parse the existing fields in the schema file, and I think BC has additional docs here:

General Overview:

https://developer.bigcommerce.com/stencil-docs/configure-store-design-ui/defining-ui-options

Adding a new "Text Input" option in schema.json - API reference - you can navigate around that opened section in the sidebar to see all available schema types:

https://developer.bigcommerce.com/stencil-docs/page-builder/schema-settings/input

Upvotes: 1

Related Questions