Betterment / test_track

Server app for the TestTrack multi-platform split-testing and feature-gating system
MIT License
119 stars 33 forks source link

Add Optional Environment Banner #212

Closed qcannon closed 4 months ago

qcannon commented 5 months ago

Summary

Currently, if an organization uses Test Track for multiple environments (e.g. production and stage), it can be a bit difficult to discern at first glance for which environment a user is managing a given split test.

This proposed change gives users the option to set a DEPLOYMENT_ENV_LABEL variable in the .env or .env.local file, which will subsequently be rendered in a bright red banner, like so:

Screenshot 2024-03-20 at 5 23 52 PM

The banner is intentionally a tad obnoxious to make it glaringly obvious to the user which environment they are in.

When no DEPLOYMENT_ENV_LABEL variable is set, the header renders as usual:

Screenshot 2024-03-20 at 5 23 24 PM

I envision organizations using the existing state for production and the banner state for a non-production environment (or perhaps vice-versa).

/domain @Betterment/test_track_core

qcannon commented 5 months ago

@smudge oh yes good call, and thank you for the tip on with_env helper! Pushed that change in https://github.com/Betterment/test_track/pull/212/commits/44389995ac4fce4bd6271f5a4db54e06c3482d95