-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
⚙️ documentationaffected functionality: documentationaffected functionality: documentation
Milestone
Description
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
I think the docs can do with more explicit types of admonitions. I have a few suggestions:
- "Returned in": When viewing a documentation of a class, sometimes I forget which bot method or object through which this class is available.
Examples
class ChatInviteLink:
"""
.. admonition:: Returned In
:class: returned-in
:meth:`Bot.create_chat_invite_link`, ...
"""- "Available in": Similar to the above, but this would include where and how this object can be found. Motivation: Our docs are currently top-down, i.e. Update -> Message -> Chat, so if I landed in "Update" I can figure out how to get the Chat object, but not vice-versa. Icon suggestions: Box-fill, Boxes, Geo fill (liked more by me)
Examples
class Chat:
"""
.. admonition:: Available in
:class: available-in
:attr:`telegram.Message.chat`, ...
"""
class Message:
"""
.. admonition:: Available in
:class: available-in
:attr:`telegram.Update.message`, ...
"""- "Use in": This would be used in classes which need to be instantiated and then passed into bot methods parameters.
Icon suggestions: Arrow left, Paperclip, Funnel (liked more by me), Stack
Examples
class ChatPermissions:
"""
.. admonition:: Used in
:class: used-in
:meth:`Bot.set_chat_permissions`, ...
"""- "Shortcuts": This would be used in the bot methods instead of the See Also currently used.
Describe the solution you'd like
These admonitions are better than "see also" (in most cases) since it tells the user what and why it was linked in the first place.
Describe alternatives you've considered
see alsos
Additional context
How to make custom admonitions: https://pradyunsg.me/furo/reference/admonitions/
Metadata
Metadata
Assignees
Labels
⚙️ documentationaffected functionality: documentationaffected functionality: documentation