def project(self, project):
        self._project = project

        # Populate fields
        if project is None:
            # Icon
            self.icon.SetBitmap(wx.Bitmap())
            self.icon.SetBackgroundColour("#f2f2f2")
            self.icon.Disable()
            # Title
            self.title.SetValue("")
            self.title.Disable()
            # Author
            self.author.SetLabel("by --- on ---")
            self.author.Disable()
            # Link
            self.link.SetLabel("---/---")
            self.link.SetURL("https://pavlovia.org/")
            self.link.Disable()
            # Star button
            self.starBtn.Disable()
            self.starBtn.value = False
            # Star label
            self.starLbl.SetLabel("-")
            self.starLbl.Disable()
            # Fork button
            self.forkBtn.Disable()
            # Fork label
            self.forkLbl.SetLabel("-")
            self.forkLbl.Disable()
            # Create button
            self.createBtn.Show()
            self.createBtn.Enable(bool(self.session.user))
            # Sync button
            self.syncBtn.Hide()
            # Get button
            self.downloadBtn.Hide()
            # Sync label
            self.syncLbl.SetLabel("---")
            self.syncLbl.Disable()
            # Local root
            self.localRootLabel.Disable()
            wx.TextCtrl.SetValue(self.localRoot, "")  # use base method to avoid callback
            self.localRoot.Disable()
            # Description
            self.description.SetValue("")
            self.description.Disable()
            # Visibility
            self.visibility.SetSelection(wx.NOT_FOUND)
            self.visibility.Disable()
            # Status
            self.status.SetSelection(wx.NOT_FOUND)
            self.status.Disable()
            # Tags
            self.tags.clear()
            self.tags.Disable()
        else:
            # Refresh project to make sure it has info
            if not hasattr(project, "_info"):
                project.refresh()
            # Icon
            if 'avatarUrl' in project.info:
                try:
                    content = requests.get(project['avatar_url']).content
                    icon = wx.Bitmap(wx.Image(io.BytesIO(content)))
                except requests.exceptions.MissingSchema:
                    icon = wx.Bitmap()
            else:
                icon = wx.Bitmap()
            self.icon.SetBitmap(icon)
            self.icon.SetBackgroundColour("#f2f2f2")
            self.icon.Enable(project.editable)
            # Title
            self.title.SetValue(project['name'])
            self.title.Enable(project.editable)
            # Author
            self.author.SetLabel(f"by {project['path_with_namespace'].split('/')[0]} on {project['created_at']:%d %B %Y}")
            self.author.Enable()
            # Link
            self.link.SetLabel(project['path_with_namespace'])
            self.link.SetURL("https://pavlovia.org/" + project['path_with_namespace'])
            self.link.Enable()
            # Star button
            self.starBtn.value = project.starred
            self.starBtn.Enable(bool(project.session.user))
            # Star label
            self.starLbl.SetLabel(str(project['star_count']))
            self.starLbl.Enable()
            # Fork button
            self.forkBtn.Enable(bool(project.session.user) and not project.owned)
            # Fork label
            self.forkLbl.SetLabel(str(project['forks_count']))
            self.forkLbl.Enable()
            # Create button
            self.createBtn.Hide()
            # Sync button
            self.syncBtn.Show(bool(project.localRoot) or (not project.editable))
            self.syncBtn.Enable(project.editable)
            # Get button
            self.downloadBtn.Show(not bool(project.localRoot) and project.editable)
            self.downloadBtn.Enable(project.editable)
            # Sync label
            self.syncLbl.SetLabel(f"{project['last_activity_at']:%d %B %Y, %I:%M%p}")
            self.syncLbl.Show(bool(project.localRoot) or (not project.editable))
            self.syncLbl.Enable(project.editable)
            # Local root
            wx.TextCtrl.SetValue(self.localRoot, project.localRoot or "")  # use base method to avoid callback
            self.localRootLabel.Enable(project.editable)
            self.localRoot.Enable(project.editable)
            # Description
            self.description.SetValue(project['description'])
            self.description.Enable(project.editable)
            # Visibility
            self.visibility.SetStringSelection(project['visibility'])
            self.visibility.Enable(project.editable)
            # Status
            self.status.SetStringSelection(str(project['status2']).title())
            self.status.Enable(project.editable)
            # Tags
            self.tags.items = project['keywords']
            self.tags.Enable(project.editable)

        # Layout
        self.Layout()