carvel-dev / ytt

YAML templating tool that works on YAML structure instead of text
https://carvel.dev/ytt
Apache License 2.0
1.65k stars 135 forks source link

[playground] Add button to create gist from current ytt playground session #460

Open gcheadle-vmware opened 3 years ago

gcheadle-vmware commented 3 years ago

Describe the problem/challenge you have When I am creating an example in the ytt playground, and I want to turn the example into a gist, I have to open a gist and copy paste each file over.

Describe the solution you'd like I would like a button in the playground that copies all files in my playground session into a single new gist. If I was looking that the playground example demo, and I clicked the "Copy to gist" button, I would expect a gist window to pop up in a new tab that I would be able to name and create the gist.

screencapture-gist-github-2021-07-13-10_09_46


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

aaronshurley commented 3 years ago

@gcheadle-vmware that's a really neat idea. Out of curiosity, could you share any use cases for when you'd like to reference these saved gists? The reason I'm asking is that maybe this feels like a need because the current examples are not exhaustive enough.

From an implementation perspective, it's a little fuzzy to me how this might work since some GH auth would be needed. If you've thought that far into this, I'd be curious to hear your thoughts.

gcheadle-vmware commented 3 years ago

The use case that made me think of this feature was helping a user with a ytt question. I had an example cooked up in the playground for the user, but I made a mistake when copying the files to a gist. The button would improve my experience, but it would not make a sizable difference.

From an implementation perspective it's a little fuzzy to me how this might work since some GH auth would be needed.

I completely agree. I do not have insight into if this is even possible, but if anyone has ideas about implementation or technical difficulty, I would love hear it.

pivotaljohn commented 3 years ago

No question in my mind that this is something that would quite valuable.

There's some work to dig into how to tie into GitHub auth. There may be some lower-fidelity version of this feature that doesn't require the user to supply a token in the browser, but instead provides a payload that can be updated with the token....

Regardless, this issue is a great place to develop ideas around this need.

joe-kimmel-vmw commented 2 years ago

note from side conversation: this might be a general "export" feature, e.g. "help me export this to a zip" or "populate my paste-buffer with something that will upload a gist of this". the underlying user story is "copy-and-pasting multiple docs from the playground is slow/tedious": what's the simplest possible thing we could do that would allow you to save from the playground, without requiring any new credentials/knowledge to be given to ytt-playground?