Typesense for WooCommerce v1.4.0 is out today. This is a major release that focuses on UI/UX improvement and future maintainability of the project.
Since this is a major release, there are some substantial changes across different areas of the plugin. We highly recommend you backup your site before upgrading, and make sure you first update in a staging environment
What’s new in
There are some major aspects of the plugin that have been changed, which renders some changes backward incompatible. The following are the major aspects.
- UI / UX changes for Responsive devices
Structure / ClassNaming Convention
- Templating structure modified
UI / UX Changes for Responsive devices
Version 1.4.0 introduces a default design for responsive devices. The new design introduces a new filter toggle button, initially all filter are hidden until the filter button is clicked.
HTML Structure / Class Naming convention
The classes naming has also been changed to replicate the structure of Algolia’s InstantSearch.
The pattern follows like this:
cmtsfwc-NameOfBlock-element--modifier to match.
filter-panel is changed to
cmtsfwc-FilterPanel and so on.
This change was brought on to ensure that there is a coherent pattern for developers and designers that is reliable and easy to understand.
Templating Structure Reformatted
If you haven’t customized the templates – this recent update will not effect you. However if you have made customizations this may indeed effect you – please create a staging site and apply the required updates.
Typesense for WooCommerce has a templating / template overriding option built in, which allows developers to make modifications as they need. Version 1.4.0 has made the templating structure a bit simpler – again – done in mind to keep the project / customizations simple and understandable.
The update also allows flexibility for developers without having to worry if updates will break their changes. This doesn’t mean that future major updates won’t break some changes, but the new structure will greatly reduce the chances of breaking changes that may be introduced.
Previous to 1.4.0 – that is 1.3.9 and below – the folder structure for overridable templates was the following :
This structure was fine if everyone would keep to the initial design / structure of the shop page.
But let’s say you wanted to show the Sorting option in the left filter panel instead of just above the results.
You would have to copy
But lets say you unhooked sort-by.php from the results header and hooked it to the right above the filter panel (which is possible) – and you came back to the project say 6 months later. It would not be logical for the sort-by.php file to be under header when you’re displaying it on the filter-panel.
With that in mind we’ve introduced the new partials folder and gotten rid of
- header folder
- main-panel folder
- filter-panel folder
And have restructured all of the template files into an aptly named “partials” folder
That sums up the most important new changes that have been introduced in version 1.4.0.
As always we look forward to any and all feedback from our users. Please reach out if you have any complaints / bug reports / suggestions.