What is a Toggle?
A toggle is a switch that has two positions: on and off. It is found in almost all software that has an options menu and in hardware such as the keyboard’s Caps Lock or Num Lock key. It also refers to a piece of material used to fasten something such as a rope or chain, for example a toggle bolt. Toggle is also a verb meaning to alternate between positions such as when you video chat with two people at once and toggle between screens.
Toggle switches should be clear to use, and have direct labels which describe the effect of their state. They should be visually distinct from their underlying controls and utilize visual cues such as movement, color, and other design principles to prevent confusion.
Savvy teams view Feature Toggles as inventory which comes with a carrying cost, and try to keep that inventory low by keeping the amount of time spent managing the configuration as low as possible. This is why many organizations choose to move Toggle Configuration out of static files and into some type of centralized store, often an existing application DB or similar. This is usually accompanied by building out some form of admin UI which allows system operators, testers and product managers to view the state of all Toggles and make changes as needed.
Aside from reducing the amount of fiddling required to manage toggle configuration there are other advantages to having it in a centralized location. One of the biggest is that if the toggle configuration needs to be changed then you can simply roll out a new release with the new configuration rather than having to restart the application to flip the flag and then restart it again in QA (as is often the case with static commenting).