Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Demo mode is the default state for Theme Designer. There is no configuration necessary to start using it. The controls on the left panel are used to select between the pages you want to view. The controls in the right panel provide the theme options. There is currently a limitation with the checkout page in demo mode in that it will not retain the settings configured on other pages. This should be resolved in the future.

Theme options

Theme options are broken into different categories. Global options are applied site wide. Page specific options are applied only to the loaded page. Developer options should not be used in Demo mode.

Caveats

There are several caveats to be aware of when using theme Designer in Presentation Mode. First is important to be aware that not all theme options that are available can be configured in theme designer. Some options are configurable only by developers and are not necessarily options available for clients to pick from. The second caveat is that not all theme options are exportable as mixins. A prime example is color options. These are configured by the developer separately, so it is important to note what colors will be applied to the primary, secondary, tertiary, page background, card container background, simple header background, and simply footer background in the JIRA card. The 3rd caveat is that you will not be able to preview the color applications on the Checkout Page at this time due to technical limitations in theme designer and loading the Checkout Page will clear any theme options you have already set. It is best to not load the Checkout Page after setting your theme options during a demo.

How To Develop Themes

Using Mixins

...

  1. Create a duplicate of the Clean Theme directory and rename it to the current client.

  2. Update the _colors.scss file in the client theme directory with all of the client color options.

  3. Update the _variables.scss file in the client theme directory with the paths to the correct image files.

  4. Update the _typography.scss file in the client theme directory with the clients font information.

  5. Pull a copy of the theme designer branch with git clone git@bitbucket.org:aspenwareunity/commerce-theme-builder.git

  6. Run Theme Designer with the yarn dev command in terminal

  7. In the Theme Designer source files, open layouts.vue and checkout.vue. Locate the scss import statement that targets the client theme. Change the path in both files to point at the client theme directory you are working on. This will make Theme Designer load that clients SCSS into the Design window.

  8. Make sure that all but the following 3 mixins are commented out in the clients _theme.scss file : @include theme-vouchers-css(), @include theme-rewards-css(), @include fix-header-for-td(). These 3 mixins need to be available during the design process.

  9. In Theme Designer, in Presentation Mode, set all of the theme option controls to match the client choices.

  10. Enable Developer mode, and click the "Export All Mixins" button.

  11. Copy the mixins from the dialog box and paste them into the clients _theme.scss file. Make sure they are uncommented and save the file.

  12. In Theme Designer, enable Preview Mode. You should now see the mixins from the clients _theme.scss file being applied.

  13. While still in Preview Mode, make any additional configurations necessary to the mixins in the clients _theme.scss file and ensure they appear correct in the Theme Designer preview.

  14. IMPORTANT: Once the theme looks how you want it, remove the following 3 mixins from the clients _theme.scss file. The CSS being provided by these mixins will already be available in Commerce so if you forget to remove them from the _theme.scss file you will have two instances of this same CSS in the live site.

  15. Copy the clients entire theme directory from Theme Designer over to the Theme directory in commerce.

  16. Fire up a local instance of Commerce, set the environment to the client and QA the entire theme.

  17. If it looks good, commit the theme to Commerce source.

Known Limitations

  1. There is a limitation with the checkout page in demo mode in that it will not retain the settings configured on other pages. This should be resolved in the future.

  2. A code change is necessary to display anything other than the “Clean Theme”, so when developing a theme there is no UI method to view other themes.

  3. A code change is necessary when developing themes to remove the CSS that is required to view the plugin based UI elements in order to ensure against duplicate CSS making into production. Forgetting to do this will result in themes having duplicate plugin CSS in production.