launchdarkly / ld-vscode

VSCode extension for LaunchDarkly
https://www.launchdarkly.com
Other
17 stars 8 forks source link

Add flag name to flag hover information #31

Closed chrismcleod closed 4 years ago

chrismcleod commented 4 years ago

Motivation We use random flag keys for more secure client side flags. Hover info with only the key in this case does not help us remember what the flag controls.

atrakh commented 4 years ago

Looks reasonable to me. I'll merge this into another branch to make sure CI passes and get a release out soon.

Thanks @chrismcleod

atrakh commented 4 years ago

Looks like this will require a bit more work to get working than I initially thought.

The extension uses the same mechanism (SSE stream) for retrieving feature flag data that our SDKs do for optimal performance in retrieving configuration updates. This data stream does not contain the flag name, so we don't have access to display that information right away.

To approach I'd take to support this feature would be to use the API to retrieve and cache the feature flag name when generating the hover tooltip. If you'd like to implement this, feel free to open another pull request against launchdarkly:2.2.1. Otherwise, I'll take a look at getting this working when I get the chance.

atrakh commented 4 years ago

@chrismcleod thanks for the suggestion. The feature flag name is now surfaced on the hover; update your extension and give it a go!

chrismcleod commented 4 years ago

@atrakh yeeeaaa! thanks a lot, works like a charmed glove. 💯