Using Toggle to Transform Standard Lists Into Expandable Sections

April 20, 2024 by No Comments

Togle

Toggle is an extension for the article editor that lets content creators transform standard ordered (ol>) and unordered (ul>) lists into interactive collapsible and expandable sections. It’s simple to use and doesn’t add any extra markup or inline styles to existing article content.

Toggles can be flipped on or off based upon a variety of conditions. These can include fitness test results from other features in the codebase, a parameter passed to an external feature flag service or a value set within the config file of a given application. It is important to consider all of the different conditions that can influence the way a toggle flips and to be diligent in creating robust tests for all possible combinations.

The use of toggles in software is well established and it is common to see them used in options menus in mobile applications. However, they have some cognitive issues that should be taken into consideration before deciding to apply them in web applications. In particular, they rely on visual cues like color to convey their state and in the case of toggle buttons that are not explicitly labeled with text on/off this can cause users confusion.

Savvy teams view their toggle inventory as carrying a cost and seek to keep it as low as possible. To this end they will often create tasks in their backlog to remove any toggles that are not needed. They also often set “expiration dates” for their toggles so that a toggle will fail a test or even refuse to run an application at all after the date has expired.