posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat(feature-flags): Use monaco editor for payload field

Open EDsCODE opened this issue 3 years ago • 2 comments

Problem

  • JSON payloads need to be editable where variants/flags are defined

Changes

  • Modified monaco editor to match lemon input style and allow for inline "coding"

https://user-images.githubusercontent.com/13127476/212139878-f0144b74-7ec8-4c2f-bcc3-bc325894ee3b.mov

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

EDsCODE avatar Jan 12 '23 17:01 EDsCODE

The options here look funny (and my screen is not shrunk or anything)

Screen Shot 2023-01-12 at 5 42 42 PM

liyiy avatar Jan 12 '23 23:01 liyiy

The saved payload isn't showing up for boolean flags

https://user-images.githubusercontent.com/25164963/212204169-1be70f3d-02de-4299-af97-7895be4d2276.mov

liyiy avatar Jan 12 '23 23:01 liyiy

All issues addressed

EDsCODE avatar Jan 17 '23 21:01 EDsCODE

The saved payload isn't showing up for boolean flags

Screen.Recording.2023-01-12.at.6.39.34.PM.mov

^ is still not working on my end 😮

liyiy avatar Jan 18 '23 03:01 liyiy

Sorry, I keep criss crossing boolean vs multivariate. Should be fixed now! Feel free to review again but going to give this another good look before merging either way. Since we're trying to store the payloads in a separate dictionary it's making the form logic on the frontend more complicated than it should be

EDsCODE avatar Jan 18 '23 04:01 EDsCODE