Creating an App Builder – Series 1
On this page you will find the first 10 episodes of our playlist demonstrating how to create a complete and compelling application using Fyne. These live-code videos were released weekly, be sure to subscribe to our YouTube channel to get notified as episodes for future series’ are published.
You can also follow along with the source code on our GitHub repository.
Series 1:
- 10: Widget and Layout Editing
- 9: Project Data and Recents
- 8: Editor State and File Save
- 7: Theme Editor and Preview
- 6: GUI Files and Unit Tests
- 5: Opening Multiple Files
- 3: Project Creation Wizard
- 4: File Tree and Editor Layout
- 2: Packaging and Opening a Project
- 1: Setup, layout and theme
Episode 10: Editing Widgets and Layouts
We start by adding a new palette to show widget information and create an overlay that allows us to tap to select, and indicate the selected widget, in our preview window. Using the GUI library from defyne that we imported earlier the info about selected widget, and the editable components, are shown on the panel.
Lastly we save the changes back to the GUI JSON file that was loaded. This gives us a fairly complete demonstration of capabilities, see you in series two when we dig deeper into the functionality.
Episode 9: Project Metadata and Recents Storage
The project data is loaded into a type that we set up to manage the data and we build a custom data binding using this structure to share data around the application. Using this binding the title, project panel and app data can all be kept up to date.
The wizard and menus then get a recent projects feature added, to help quickly open projects that have been worked on recently. We also review the Markdown editor which was added between videos.
Episode 8: Editor State and File Save
We focus this week on tracking editor state and improving the code cleanliness around the growing number of file editors. By tracking whether files have been edited we can note that in the document tab bar for easier tracking of what has changed.
Then we add file saving into the text editor to demonstrate how save can work, as well as clearing the edited state so that the data binding will update the doc tabs again. Finally we add shortcuts so we can save as we type!
Episode 7: Theme Editor and Preview
By setting up a custom theme that overrides the current variant we can move from light to dark mode and (using a still-to-be-released Fyne feature) preview the change in our app UI.
We then build our first custom widget as well, creating a colour picker and display widget that will control a single colour from the theme. By using these to control an editable theme we can modify the theme and view the changes live in our GUI preview widget for real time feedback.
Episode 6: GUI Files and Unit Tests
We introduce Fyne’s test utilities to validate and demonstrate the capabilities, showing how to check the graphical rendering or the data in loaded widgets. This functionality is then used to add a graphical JSON file into the project tree and load it from the main menu.
Lastly we go back to a question about uniqueness of file names in the doc tabs and fix up the display to show files and their parent directory where needed.
Episode 5: Opening Multiple Files
Using Tree.OnSelected we open a new file preview for each URI, looking up the appropriate visuals based on file extension or mime type. In the example we create text and image previews with placeholders of more to come.
We then introduce DocTabs to handle multiple files and use a map of URI to open TabItems to avoid opening twice and select the item when tapped. Lastly we see how `DocTabs.CloseIntercept` can help us keep track of items being closed, like the Window API.
Episode 4: File Tree and Editor Layout
The file tree is populated with files and directories found when the project directory is opened. We also create a basic preview of an app window in the editor area. Lastly a placeholder is added to the right (settings) panel using RichText and a markdown helper.
This episode uses unreleased components from Fyne so we see how to use the “develop” branch to get access to these new containers and widgets.
Episode 3: Project Creation Wizard
To start the new types were created in a new package, and the appropriate APIs created. Then we construct the user interface aspects to display the wizard. Then we looked at how to code up the flow for pushing new items into the navigation and popping them off when pressing a generated back button.
Lastly we add a form to the flow that collects data needed to make a new project – and we write the files to create a new project on disk / data store!
Episode 2: Packaging and Opening a Project
The main content of this video is looking at how we can use the storage package and FolderOpen dialog to ask the user which project we should open. Using these abstractions means that we get full support for file handling on sandboxed (i.e. mobile) devices and are not limited to where we have full access to the file system. We also look at adding a menu to the application and also take a quick look at data binding as well, to decouple our UI from the file handling code.
Episode 1: Setup, layout and theme
In the second half we explore how a custom theme and custom layout can make this reflect well the design brief. You can see the result of the coding session in the screenshot on the right, or watch the full video below.
