Releases

April Release of Saleor: Introducing Black

Marcin Gębala

13 May 2019 · 3 min read
articleTop

Welcome to the April 2019 release of Saleor! Read on to learn about the newest changes!

  • Black has now been introducted to Saleor to help stay on course with essential code formatting and keep our open source project universally maintainable and understandable
  • We've also introduced data classes as a universal payment interface for all versions of Python from 3.7 onwards
  • You can now complete bulk actions in Dashboard 2.0, such as editing, deleting, or publishing, which saves time and makes for easy overviews of grouped products

Any color you like, as long as it’s Black

Proper code formatting is one of the essential things that help to keep an open-source project universally maintainable and understandable. We had Google’s YAPF in Saleor, but the formatting was only applied to some of the newer code, while a lot of the original core was using inconsistent styles. To address this issue, we decided to pick a modern tool that a number of open-source projects have recently adopted. Black is an opinionated code formatting tool for Python that comes with a fixed set of rules which are subject to only limited adjusts. And that’s one of the greatest powers of Black. We’ve also added support for Pre-commit which makes sure that every commit you create contains appropriately formatted code.

Any color you like

Data classes as a universal payment interface

One of our goals for the future is to extract payment gateways to separate repositories and provide a standard interface that’ll make implementing new ones easier for the community. We’re also investigating ways to have a plugin architecture where integrations can be optionally turned on and off. For that, we want to benefit from Python 3.7’s data classes which can be used as standardized objects to pass data between various parts of the system. As data classes are not supported in Python versions before 3.6 (in 3.6 they’re available through a third-party library), we decided to drop support for Python 3.5.

Data class to represent data returned by payment gateways

Data class to represent data returned by payment gateways

Bulk actions in Dashboard 2.0

A useful management Dashboard is one that allows users to perform everyday actions quickly. From now on, users can perform selected actions for multiple objects rather than repeating actions. It currently supports the most common operations, such as deleting items or publishing/unpublishing products and pages, but more will be added in the future.

Bulk actions in product list view

Bulk actions in product list view

These were the highlights of the release. For the full changelog, go to the Github release page.

Future releases

There are a few areas that we’re currently working on and planning to ship in the next version:

  • Navigation menus management in Dashboard 2.0 — views to create and manage menus displayed in the storefront.
  • Improvements to the payment architecture and currently supported payment gateways.

Thank you

A big thank you 🙏 to all contributors, stargazers, and supporters of Saleor!

Contributing

For those of you who are interested in contributing to the project, we 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 channels on Gitter and Spectrum; they serve best if you have quick questions that don’t require opening an issue on GitHub.

SHARE:

Marcin Gębala

Full stack engineer at @mirumeelabs. Development lead of @getsaleor.

Check these too