-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for user-provided comments with Giscus #7520
Conversation
c82273b
to
df8acb4
Compare
df8acb4
to
81cb2c6
Compare
The User-contributed notes policy seems good. I'd maybe change the bit about licensing to maybe say in the docs and the Godot project/engine, and try to link to existing license pages for both instead of mentioning any specific license, but not sure. We should also consider making sure this does not work in local dev builds and in forks by default unless you toggle something, otherwise if another random docs website mirror appears, I could see that lead to confusion. Same for translations - if a page in a non-english translation has no comments yet, it may be too easy to just leave a comment in whatever native language, becoming confusing for other users. Also need to check how reporting/moderation would work. I'm also less sure whether we should bother adding this to 3.x docs at all. Everything worth discussing in 3.x has probably already been discussed ad nauseam elsewhere, and we don't get many 3.x docs PRs these days, so I assume most things at this point in time are mostly complete and in a good shape, mature as 3.x is. So I could see the confusion between comments between 2 major versions outweigh the benefit. Besides those small need-to-check TODOs, this looks good to me and it has my stamp of approval. |
81cb2c6
to
a3677b7
Compare
We don't have the documentation license listed on godotengine.org/license, but I've changed the wording to also mention the engine itself and its license.
I've changed it to disable comments integration if not building on Read the Docs, and if the language isn't English. I'm not sure what would be the best way to disable it in forks automatically, preferably at build-time in
I agree with making it 4.x-only. |
Yeah, a build var similar to |
I've added |
6b4d807
to
7510e88
Compare
I've performed repository setup on https://github.com/godotengine/godot-docs-user-notes. I'll look into updating Edit: Done 🙂 |
7510e88
to
43dab17
Compare
Rebased and tested again, it works as expected. Pages in the About section no longer allow comments too. |
43dab17
to
eb089d6
Compare
eb089d6
to
e7b4dda
Compare
This allows users to leave comments on pages that don't have `:allow_comments: False` somewhere in the page's source. Both manual and class reference pages can receive comments. Index pages cannot have comments, as discussion should occur on "leaf" pages. GitHub Discussions is used as a backend on the same repository. This means that Discussions *must* be enabled on godotengine/godot-docs before this commit is merged to `master`. Users can choose to use the "Custom" watch mode if they don't want to get notifications for discussion updates, but still get notifications for issue and pull request updates. User comments are intended to be used for the following purposes: - Add a clarification or correct something in the documentation, without having to open a pull request. Contributors are encouraged to take a look at discussions from time to time, and see if there's information worth incorporating in the pages themselves. Don't forget to reply to the comment when doing so :) - Mention a workaround for a common issue. - Link to useful third-party resources that are relevant to the current page, such as tutorials or add-ons. User comments should *not* be used for technical support. Other community platforms should be used for that. Page-to-discussion matching is done using the `pagename` Sphinx variable, which is independent of the Godot version and documentation language. Being independent of the Godot version allows keeping old comments when the Godot version changes, while also allowing users from `/stable` and `/4.1` to "see" each other in discussions. See https://giscus.app for more information.
e7b4dda
to
95fb178
Compare
Thanks for working on this! Let's see how this works out. |
In a fashion similar to https://php.net's comments, this allows users to leave comments on pages that don't have
:allow_comments: False
somewhere in the page's source. Both manual and class reference pages can receive comments. Index pages cannot have comments, as discussion should occur on "leaf" pages.GitHub Discussions is used as a backend on the same repository.1 This means that Discussions must be enabled on godotengine/godot-docs before this commit is merged to
master
. Users can choose to use the "Custom" watch mode if they don't want to get notifications for discussion updates, but still get notifications for issue and pull request updates.User comments are intended to be used for the following purposes:
User comments should not be used for technical support. Other community platforms should be used for that.
More details can be found in the User-contributed notes policy I've written.
Page-to-discussion matching is done using the
pagename
Sphinx variable, which is independent of the Godot version and documentation language. Being independent of the Godot version allows keeping old comments when the Godot version changes, while also allowing users from/stable
and/4.0
to "see" each other in discussions.See https://giscus.app for more information.
TODO
:allow_comments: False
on all index/listing pages.makerst.py
in the main Godot repository to write:allow_comments: False
at the top ofclasses/index.rst
, as was done manually here. makerst: Disallow user-contributed notes on the class index page godot#85006godotengine/godot-docsgodotengine/godot-docs-user-notes and use the Giscus setup form again, so that the discussion category unique ID is updated. Use the following options, with "Calinou/godot-docs" replaced by "godotengine/godot-docs".layout.html
to point to godot-docs' version, rather than the Calinou fork.Preview
https://github.com/godotengine/godot-docs-user-notes/discussions
Example at the bottom of the 3D text page
The theme follows the system theme, which means it'll adapt to the documentation's theme automatically.
Footnotes
We can choose to use a dedicated repository containing just discussions if we wish to do so. ↩