How to Use a Togle to Manage Feature Releases

June 30, 2024 by No Comments

A toggle is a button or interface element that lets people choose between a pair of opposing states, like on and off. They use a different appearance to indicate each state. The best toggles clearly identify the setting, view, or content they control, and update their appearance based on their current state. They are also designed to work consistently across platforms.

Feature toggles are used in many different ways to manage feature releases. Some are long-lived, others are short-lived or semi-permanent. They can be managed by a variety of conditions, from fitness test results in the codebase, to a variable in your feature management platform.

Savvy teams consider the number of toggles in their codebase to be inventory that comes with a carrying cost, and seek to keep it low by being proactive about removing old toggles as they become idle. This can be done by adding a toggle removal task to the team backlog, or building the process into your management platform.

Some teams even go as far as to put an expiration date on their toggles, and will fail a build if the toggle has not been flipped within a certain timeframe. This is similar to how Canary Releases and Champagne Brunch features are managed.

While it can be tempting to hardcode toggle configuration, especially when you are working on a specific project, this often creates problems with re-configuring the toggle at runtime. This can cause delays and stifle the feedback loop in your development process.