Skip to content

Add toogle gem to toggle feature flags in a web UI

Thomas Hutterer requested to merge toggle_ff_with_toogle into master

What does this MR do and why?

Adds the toogle gem which allows to toggle feature flags in RAILS_ENV=development without the rails console dance 💃

Motivation

I got a bit tired of running console commands just to toggle a feature flag on for a quick MR review. And during work on a bigger epic where we juggled half a dozend feature flags, it also got cumbersome to check which flags I currently had on and which I was missing in my GDK.

That's why, over the last few weeks, whenever time allowed, I worked on this little thing called toogle. It is its own little Rails engine, published as a gem, with little to no dependencies on other gems we use, so it's super easy to integrate into our main codebase (and would also be as easy to remove again. It's litterally just one line in the codebase.) And it only runs in development mode, so no impact on production systems.

When showing a prototype to a few team members, I got only positive feedback, so I hope this will be useful to others as well.

Screenshots or screen recordings

image

How to set up and validate locally

  • bundle && gdk restart rails-web
  • Go to /rails/features.
  • Toggle away!

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Hutterer

Merge request reports