After a lot of hard work from a dedicated team we are excited to announce release 1.4 of the Fyne toolkit. This is a huge update with some great new functionality and it paves the way for some bigger changes in 2.0 early in 2021.
Nearly 700 commits from 15 different contributors has made this a bumper release. A comprehensive list of new features appears later, but first let’s explore two big changes.
For the first time since the initial public release we took the opportunity to refresh the standard theme. For 1.4 we have updated the color scheme to better reflect standard material design colors and to use the same primary color on light and dark mode themes. We have also included an update to the fyne_demo app that is better able to show off all the new features that come as standard in this latest release.
Not only does this update provide a more vibrant look and feel to all applications but it enabled us to allow users to choose alternative primary colors to suit their tastes. This selection can be made through the fyne_settings app or the File->Settings menu item in fyne_demo.
The 1.4 release brings many new widgets to Fyne, but the biggest of those are the new collection widgets - List, Table and Tree. When looking at the existing widget set we realised that showing large amounts of data was not well supported, and so we set out to change this.
The collection widgets combine caching and a data abstraction that allow them to provide high performance presentation for very large datasets. They can handle many thousands of data rows with different arrangements based on widget. List will show one dimensional data, Table is for two dimensions (rows and columns) and the Tree can show data with a hierarchical structure. Their performance is based on what is currently on screen - the rest of the dataset is not read until scrolled into view.
Each widget has a similar API design for querying the data size and configuring
presentation. The List widget, for example, requires a developer to provide the
following functions (normally passed in the
Length func() int CreateItem func() fyne.CanvasObject UpdateItem func(id ListItemID, item fyne.CanvasObject)
In this example Length returns the number of rows to display. Each time a new graphical
item is required (for setup or if the widget expands) the
CreateItem will be called and
the developer should return a template
CanvasObject. When data will be displayed the
UpdateItem will be called, specifying the data index to lookup and the template object
that should be configured.
This is a big step forward for complex application use-cases and we can’t wait to see what the community builds with the new functionality. There are many great new features also included in this release, see the full list below.
The following is a list of highlights of what is included in this release. As you can see there are a number of APIs that have been deprecated (see “Changed” below) many of which already have new replacements. Some of the deprecated areas are in preparation for some big changes in the 2.0 release that we are now working towards.
For more information about how these changes may impact your application please see our upgrading guide.
The list of resolved issues is very long, if you want to see it in full head to the change log.
We're excited to hear from anyone interested in the project. Whether it's to find out more, provide suggestions or to get involved - drop us a line!
If you would like to join the community for a chat you'll find us in the #fyne channel on gophers Slack or on our Discord server. If you are not already a member of the communities you can use a Slack invite or Discord invite.