lazygit - the files panel

The files panel reflects your git workspace while working on changes locally in your repository. It offers staging, committing, stashing, and clearing your local workspace. This post will introduce all details of the files panel below.

Continue reading

Saturday, 3. April 2021

lazygit - Introduction to a new series

You might consider yourself a person that has a working knowledge of git. I certainly do. I use git daily, swinging between branches and worktrees, doing interactive rebases and using features that many might label "advanced" git features.

But still, I keep struggling with some of the features that are not used everyday. Not necessarily because I don't get the concept behind them. I either keep forgetting the correct command and its order to use or find typing the command tedious, even with aliasing it to make it shorter.

I recently integrated lazygit into my daily working with git. It helps with making some operations faster, and provides an interface to perform some of the magic whose commands I would need to look up often. In this tutorial series, I will demonstrate this tool from its basic usage to advanced features, starting with an introduction in this post.

Continue reading

Thursday, 1. April 2021

Upgrading OpenProject's frontend from AngularJS to Angular while keeping development alive

I already mentioned in the last post that at OpenProject, we have been migrating our AngularJS 1.6 frontend to Angular 5 (now 6). This has been an ongoing effort over the past 6 months and has concluded in the past weeks.

This blog posts reflects on my experiences on the continuous ugprade process while maintaining a usable development branch that neither blocks integration testing nor development on other areas of the application.

Continue reading

Saturday, 22. September 2018

Angular tabbed components using a CDK portal outlet

While upgrading and rewriting parts of our configuration AngularJS modals at OpenProject, I needed to replace multiple modals with a single one that splits the configuration into separated tabs. Users make changes to their configuration in each of these tabs, switching between them and save all changes alltogether.

Since each previous modal (now tab) already provided saving changes, It makes sense to keep that logic separated in the tabbed components and allow each tab to save their changes whenever the modal is closed.

For splitting a shared content area, Angular CDK offers us portals, and specifically, the DomPortalOutlet to attach different components to a shared host element.

This is perfectly suited for tabs with isolated logic and templates you wish to switch between.

However when using the CDK outlets, each ComponentOutlet creates and destroys component instances whenever attaching and detaching them. That means creating components each time you switch between tabs.

For performance reasons, this will likely be irrelevant due to the tab content being negligible. However, as components are reinstantiated, you will lose all logic isolation if you wish to modify and keep user-provided data in a tab which is being detached.

Of course you can work around that by passing and injecting a data store for each tab, but then processing that data (e.g. assume submitting changes when clicking save) again requires some level of isolation.

Instead, we can create an extended portal outlet which I dubbed TabPortalOutlet that instantiates components as they are required, and keeps their instances around until the outlet is disposed.

Continue reading

Wednesday, 11. April 2018

Show all articles (17)