Skip to content

Conversation

iron3oxide
Copy link
Contributor

Since discussions within that category are mostly help requests and I frequently find myself having to ask for more info from the OP, e.g. an error message or a code sample, I thought it would be nice to have a template. It can be seen in action on this fork.

The GitHub discussion category form feature is in public beta, so this template might suddenly not work anymore because GitHub changed the syntax or something else broke. It is my understanding though that in that case the default template would simply be chosen, so it wouldn't be a major inconvenience.

Apologies that it's 15 commits when it could have been 1 or 2, it was a trial and error process and much to my disdain, GitHub didn't document what the category slug for categories containing an "&" is.

@FeodorFitsner
Copy link
Contributor

Cool! I see it's being triggered when help wanted label is applied to a discussion - it works on your fork. Could you tell how to configure the same in Flet's repo?

@iron3oxide
Copy link
Contributor Author

It works a bit differently: it gets triggered when you start a Q&A discussion, presents the user with a custom form and automatically adds the "help wanted" label (the user can of course remove that before or after posting). You can try that out in the fork.

There should be no configuration necessary, when a discussion is started, GitHub will automatically look for a yaml file in the .github/DISCUSSION_TEMPLATE/ directory that is named after the slug of the category the discussion is intended to be started in, in this case q-a.yml. One can therefore easily add templates for other categories, see the docs here.

- type: markdown
attributes:
value: |
This is the place to ask for specifics about flet or for help with problems you encountered while using it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change flet to Flet please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@FeodorFitsner FeodorFitsner merged commit 34fb1d9 into flet-dev:main Feb 21, 2023
berecik pushed a commit to Marysia-Software-Limited/flet that referenced this pull request Apr 3, 2023
* feat: Add discussion template for Q&A

* refactor: Test if "general" makes the template available

* refactor: test if omitting some fields breaks the template

* fix: the previous commit broke the template, next test

* fix: maybe explicit empty strings will be accepted

* fix: step by step testing continues...

* fix: Xs instead of empty strings everywhere

* refactor: next round of testing

* refactor: try different name for q&a

* refactor: try qa.yml

* refactor: try q-a.yml

* refactor: Word a description better

* refactor: Change up order

* fix: fix label (hopefully)

* style: Change "your question" to "question"

* style: Change "flet" to "Flet"
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* feat: Add discussion template for Q&A

* refactor: Test if "general" makes the template available

* refactor: test if omitting some fields breaks the template

* fix: the previous commit broke the template, next test

* fix: maybe explicit empty strings will be accepted

* fix: step by step testing continues...

* fix: Xs instead of empty strings everywhere

* refactor: next round of testing

* refactor: try different name for q&a

* refactor: try qa.yml

* refactor: try q-a.yml

* refactor: Word a description better

* refactor: Change up order

* fix: fix label (hopefully)

* style: Change "your question" to "question"

* style: Change "flet" to "Flet"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants