upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

Add "path" type to patches in xpls #344

Open IsaacLeeWebDev opened 1 year ago

IsaacLeeWebDev commented 1 year ago

What problem are you facing?

Hey team!

I'm sure you're familiar with the patches field of a resource in a Composition where you list two "field paths" listed under fromFieldPath and toFieldPath:

image

The problem is that I'm not always very good at typing out a correct field path– sometimes I'm too lazy to even double-check if it's a valid one in the referenced object!

My cat also sometimes likes to jump on my keyboard and try his paw at coding, and he might type out something crazy like this:

image

If that were to happen again, I probably wouldn't know I'd been cat-hacked until I tried to deploy.

How could Upbound help solve your problem?

It would be really nice if xpls could validate/autocomplete my options for fromFieldPath and toFieldPath here. That way, I can just sort of browse my way to a valid answer, and I don't have to look at any schemas to make sure my values were correct. Something similar to what we get from the Advanced TypeScript type Paths would be ideal:

image

I hope this feedback is helpful! Thank you for your time and hard work on this really exciting product!

Epic #

jbw976 commented 1 year ago

This is great @IsaacLeeWebDev, thanks for taking the time to write this up and describe the scenario you'd like to see implemented. We've started doing some very early thinking that is quite aligned with this request, so this is very validating to see that the direction we're exploring would benefit you and other folks in the community 💪