github saleor/saleor 2.0.0
October 2018 - Saleor 2.0 release

latest releases: 3.19.30, 3.19.29, 3.18.37...
5 years ago

Welcome to the October 2018 (2.0.0) release of Saleor!

This month isn’t your average release. You’ll probably have seen from our recent communications on social media that we feel so strongly about the size of this release that we are calling it Saleor 2.0. For those of you paying attention to versioning, don’t worry about the number! The important thing is that this month’s release of Saleor is something special. We’ve spent month’s working on a brand new architecture for the platform, decoupling the front end from the back, to create a full-fledged GraphQL, which allows us to create a great new dashboard and storefront with a bunch of cool features, as well as created a full PWA solution.

For the full story about why we made the changes, check out our release blog post here.

Below are the main technical features we’ve changed for the release of Saleor 2.0.

Single-page storefront

We are proud to present you the beta version of the new single-page storefront! Our goal was to provide a modern shop template that utilizes some of the newest technologies available on the market: PWA, GraphQL API, Apollo Client and React. The main storefront draws on some of the best commercial solutions available, as we have aimed to offer UI and UX beyond what people think is possible with an open source platform. The beta-version PWA is functioning, and can also be checked out in our new demo pages, but we will be building it up to its full potential over the coming weeks.

New payments module (breaking change)

This release is the first to include the new payment API which replaces the solution based on django-payments. Our decision was motivated by the fact that the original solution was built on the assumption that the whole payment flow could be wrapped in a Django form, and that some of the payment integrations were done manually by sending raw HTTP requests to the gateway APIs. From today's perspective, it's no longer a suitable approach in modern web apps. Firstly, it's difficult to expose such payment API to a single-page application. Secondly, some of the payment gateways now provide their own libraries they recommend using as an integration method. Lastly, with the new approach, we no longer have to process sensitive payment data in our backend, but we can send it directly to the payment gateway, thus making Saleor fully PCI compliant.

One of the obvious downsides of dropping django-payments is removing some of the previously supported payment gateways from Saleor. It is our top priority to add next payment providers in future releases but, in the long run, we believe that it is the right decision to make the change now, as it opens possibilities for exciting payment methods such as Apple Pay or Google Pay.

Note: This change is a breaking one, as it removes support for some of the payment gateways that the old library supported. Migrating from the older version of Saleor shouldn't remove any recorded payments from the database, as we provided a dedicated data migration.

GraphQL API optimization

Since its first release in June, our GraphQL is maturing fast. On top of numerous improvements to our queries and mutations, we’ve applied a significant performance improvement by adding a dynamic data prefetching mechanism. Thanks to amazing graphene-django-optimizer library we can dynamically prefetch database tables based on which fields were included in queries. We also optimized queries used by the new dashboard and storefront to make the view load faster.

New Dashboard 2.0 sections

Development of the Dashboard 2.0 is coming along well. We finished five new sections in the last month: customer management, collection management, product types, site settings, and a brand new dashboard homepage! After applying query optimization to the API that powers the dashboard, we can see a significant improvement in page-load speed.

API changes

Add mutation to delete a customer; add isActive field in customerUpdate mutation - #3177 by @maarcingebala
Add mutations to manage authorization keys - #3082 by @maarcingebala
Add queries for dashboard homepage - #3146 by @maarcingebala
Allows user to unset homepage collection - #3140 by @oldPadavan
Use enums as permission codes - #3095 by @the-bionic
Return absolute image URLs - #3182 by @maarcingebala
Add backgroundImage field to CategoryInput - #3153 by @oldPadavan
Add dateJoined and lastLogin fields in User type - #3169 by @maarcingebala
Separate parent input field from CategoryInput - #3150 by @akjanik
Remove duplicated field in Order type - #3180 by @maarcingebala
Handle empty backgroundImage field in API - #3159 by @maarcingebala
Generate name-based slug in collection mutations - #3145 by @akjanik
Remove products field from collectionUpdate mutation - #3141 by @oldPadavan
Change items field in Menu type from connection to list - #3032 by @oldPadavan
Make Meta.description required in BaseMutation - #3034 by @oldPadavan
Apply textwrap.dedent to GraphQL descriptions - #3167 by @fowczarek

Dashboard 2.0

Add collection management - #3135 by @dominik-zeglen
Add customer management - #3176 by @dominik-zeglen
Add homepage view - #3155, #3178 by @Bonifacy1 and @dominik-zeglen
Add product type management - #3052 by @dominik-zeglen
Add site settings management - #3071 by @dominik-zeglen
Escape node IDs in URLs - #3115 by @dominik-zeglen
Restyle categories section - #3072 by @Bonifacy1

Other

Change relation between ProductType and Attribute models - #3097 by @maarcingebala
Remove quantity-allocated generation in populatedb script - #3084 by @MartinSeibert
Handle Money serialization - #3131 by @Pacu2
Do not collect unnecessary static files - #3050 by @jxltom
Remove host mounted volume in docker-compose - #3091 by @tiangolo
Remove custom services names in docker-compose - #3092 by @tiangolo
Replace COUNTRIES with countries.countries - #3079 by @neeraj1909
Installing dev packages in docker since tests are needed - #3078 by @jxltom
Remove comparing string in address-form-panel template - #3074 by @tomcio1205
Move updating variant names to a Celery task - #3189 by @fowczarek

Bugfixes

Fix typo in clean_input method - #3100 by @the-bionic
Fix typo in ShippingMethod model - #3099 by @the-bionic
Remove duplicated variable declaration - #3094 by @the-bionic

Docs

Add createdb note to getting started for Windows - #3106 by @ajostergaard
Update docs on pipenv - #3045 by @jxltom

Future releases

For the next couple of months, until the the of 2018, we plan to slow down development a bit and concentrate on maintaining and optimizing the major changes we have implemented with this release. This includes polishing the new payment module and improving the new single-page storefront and dashboard to make them more stable.

Thank you

A big thank you 🙏 to all contributors, stargazers, and every other supporter of Saleor!

Contributing

For those of you who are interested in contributing to the project, we’ve prepared a bunch of issues labeled as help wanted. Don't worry if you don't fully understand the problem ;  our team will try to guide you and answer all your questions. Remember to check our channel on Gitter; it is best channel if you have quick questions that don't require opening an issue on Github.

We will be attending the GraphQL Summit on November 7–8 in San Francisco. Let us know if you want to meet us, chat about Saleor, and grab some of our cool swag!

Make sure to check out the article about this release on our blog!

Don't miss a new saleor release

NewReleases is sending notifications on new releases.