PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.78k stars 1.3k forks source link

New feature flag creation flow #13325

Open corywatilo opened 1 year ago

corywatilo commented 1 year ago

@annikaschmid and I have been brainstorming an improve feature flag creation flow.

Note: This UI set within the context of the PostHog 3000, but the concept should be easily adaptable to what we have now, assuming we want to ship it sooner than that.

image

Step 1: Info

image

Step 2: Code

image

Step 3: Release conditions (Option A: Developer mode)

image

Step 3: Release conditions (Option B: Live mode)

image

neilkakkar commented 1 year ago

A part I don't like about having multistep forms like the above for feature flags:

When I already know what I want, it's frustrating to go to multiple steps in a form, clicking next, next, next, publish; to create a flag.

The key here being that most of these steps are optional. All you need for a fully fledged feature flag is the name, and that's it.

I think a workflow like this makes sense when in tutorial mode, i.e. we're showing you what all is possible with flags, and here's how to use them. But doesn't make too much sense to me in 'work mode', where I'm aware of the capabilities and just want to get my work done.

Example: In the current form, I can type in the key, click Save, and I'm done:

image

I love that I don't have to scroll down to anything, unless I really want to. (This is exactly what I do when developing locally and I just want the flag enabled)

patleeman commented 1 year ago

A copy "code snippet to clipboard" in Step 2 would save a bit of work.

Also a nice enhancement would be syntax highlighting in the code block.