google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.61k stars 901 forks source link

Issues created from the website should use a template and link to the page they were created from #1152

Open roberthbailey opened 2 years ago

roberthbailey commented 2 years ago

Is your feature request related to a problem? Please describe. Right now if you click on the "Create documentation issue" link from a page on the website, it opens a new issue with the issue title set to the name of the page and nothing in the body.

Describe the solution you'd like I would like for documentation issues created from the website to use a template (like this one that is used for feature requests). It would be great if we could also fill in a link to the page that generated the ticket so that it was easy to track back to where the user clicked the button. And it would be nice to automatically add tag(s) to the ticket as well (although using a template might handle that automatically).

Describe alternatives you've considered We can leave it as-is, but it makes it difficult to track where documentation tickets come from unless the person filing them goes out of their way to make it clear and obvious.

I originally filed this issue in our github project as https://github.com/googleforgames/agones/issues/2706 but after looking at the docsy site I believe it's an upstream issue.

markmandel commented 2 years ago

Just doing some research - you can prefill an issue from Github URL parameters!

https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue#creating-an-issue-from-a-url-query

LisaFC commented 2 years ago

So that should be doable, as in the docs Mark linked to, you can add body text to an issue as well as just a title (as we do) using the link URL. Though a full template would involve building an enormous issue URL, and would probably be difficult to create template text that worked for all Docsy users. You could maybe pull it from a file.... Would even just the full URL of the page in the body be useful? I think we just added the page title as a title to the issue URL as we were thinking of relatively small sites where that's identifying enough.

Adding labels via an issue link sadly doesn't (generally) provide anything useful because the user filing the ticket needs to have edit permissions on the repo to add labels/tags.

Here's the layout that builds those links if you want to look at customizatipn (adding a "body" to the issue URL) for your own site while we think about if it could be generalized: https://github.com/google/docsy/blob/main/layouts/partials/page-meta-links.html#L35

roberthbailey commented 2 years ago

Here's the layout that builds those links

If we can customize that link, we can create new issues from an issue template (or possibly even an issue form). What I haven't been able to figure out, and it might need some experimenting, is to determine if we can pass in parameters to a template (e.g. the page title or url) to automatically pre-fill some sections in a template/form for the user based on the page where the clicked the link. Otherwise we are stick trying to jam the template into the URL as query parameters, which sounds way less maintainable and discoverable than using an issue template that can be stored with our existing issue templatess.

I think we just added the page title as a title to the issue URL as we were thinking of relatively small sites where that's identifying enough.

That makes sense. What I've found confusing is when a user doesn't add much additional context to the issue it can be confusing just from the title what they are expecting to be fixed on the website.

while we think about if it could be generalized

I think people might find it useful to have a link to the page where the issue was created automatically added to the body. But if no one else has raised this concern, as long as sites like ours can override the URL it may not be worth changing the default behavior.