Managing Toggles in a Savvy Team Environment


A toggle is a switch that has two positions, on and off. It is the preferred user-interface component for changing system settings and preferences, and for adjusting the state of an element of an interface, like a video game speed toggle. Toggles are also great for enabling users to make a yes or no choice, such as selecting whether to enable or disable the Airplane Mode on a mobile phone. Toggles take less screen space than radio buttons and offer the benefit of immediate results. If an immediate result is not possible, a toggle should be replaced with a checkbox to avoid any ambiguity in the user experience.

When a team introduces Feature Toggles into their codebase it is important to be proactive in taking steps to remove them when they are no longer needed. Savvy teams typically have a process in place for managing this, adding a task to the backlog whenever a toggle is first introduced and ensuring that the team actively works to keep the inventory of Feature Toggles to a minimum. Some teams even go so far as to put “expiration dates” on their toggles which will fail a test (or even refuse to start an application) if the toggle is ever deemed to be out of date.

Using static files to manage toggle configuration can become cumbersome at scale and introducing changes can be difficult in environments that are shared between multiple developers and testers. To address this problem many organizations move their toggle configuration into some type of centralized store, often an existing application DB, and build out an admin UI for viewing and modifying Feature Flags.