What Is a Toggle Control?
Toggle is a control that allows users to switch between settings, preferences or other states of a system. It’s typically preferred over radio buttons because it takes up less screen estate and delivers the desired functionality in a more intuitive manner. Whether used on mobile or desktop it’s important to choose a color and label that’s high-contrast and easy to understand. It’s also important to consider societal and cultural implications when choosing the toggle’s On/Off states.
Toggles can be managed in a variety of ways, from static files to advanced dynamic re-configuration systems. For a large scale application it’s often best to move the toggle configuration into some type of centralized store (often an existing app DB) which can be used by all teams and stakeholders. This approach is typically accompanied by a build-out of some form of admin UI which can be used to view and modify Features Flags.
Savvy teams look at Feature Toggles as inventory that comes with a carrying cost, and seek to keep the amount of inventory low by being proactive about removing unused toggles from their codebase. Some teams even put an expiration date on their toggles, to ensure they are removed prior to any major release.
When it’s time to test a toggle it’s important to test the toggle configuration that’s expected to go live in production, as well as a fall-back toggle configuration which is all of the flipped-On toggles. Testing the fall-back toggle configuration will ensure that any regressive regressions are captured during the QA process, and that the QA team can easily identify and correct them.