Skip to content

Conversation

@lemontree210
Copy link
Member

@lemontree210 lemontree210 commented Jan 13, 2023

addresses #3496

  1. "Returned in" admonitions are generated automatically
  2. "Available in" admonitions are generated automatically
  3. "Use in" admonitions are generated automatically
  4. ..seealso notes were separated and included manually because they contained both shortcuts and links to Wiki

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

Nice job. The docs as artifact is already helping.

Can we also make a new icon for this? I have two in mind:

  1. Speedometer - https://icons.getbootstrap.com/icons/speedometer/
  2. Signpost - https://icons.getbootstrap.com/icons/signpost/

@lemontree210
Copy link
Member Author

2. Signpost - https://icons.getbootstrap.com/icons/signpost/

Done (signpost)

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

I went through the docs and they look really nice on there. Hopefully more people will start using them

@harshil21 harshil21 added enhancement ⚙️ documentation affected functionality: documentation labels Jan 13, 2023
@harshil21 harshil21 added this to the v20.1 milestone Jan 13, 2023
@lemontree210 lemontree210 changed the title replace seealsos with shortcut admonitions Add admonitions Jan 14, 2023
@lemontree210 lemontree210 linked an issue Jan 14, 2023 that may be closed by this pull request
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Nice work indeed! 🚀 I left a few smaller comments below.

I would like it very much if we could make the bullet point list collapsed by default if there's more than, say, 5 items. for Message, the list is really rather long … I'd be okay if that's done in a follow-up PR.

@lemontree210

This comment was marked as resolved.

@harshil21

This comment was marked as resolved.

@lemontree210

This comment was marked as resolved.

@harshil21

This comment was marked as resolved.

@lemontree210

This comment was marked as resolved.

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

Amazing change, the docs somehow just keep getting better.

@lemontree210

This comment was marked as resolved.

@lemontree210

This comment was marked as resolved.

@lemontree210

This comment was marked as resolved.

this currently affects nothing but is worth including
`Bot` had a "Returned in" admonition linking
to `ApplicationBuilder` because of a custom generic
there is no need to call `typing.get_args()`
and check its return because `self._resolve_arg()`
has recursive calls anyway.
they only contain Appbuilder's own methods
@harshil21
Copy link
Member

harshil21 commented Jan 21, 2023

Found some more missing links, I think this is the last of it:

Use-in:

  • telegram.ext.{Defaults, ContextTypes, {Base, Pickle, Dict}Persistence, {Base, AIO}RateLimiter-> telegram.ext.ApplicationBuilder

Available-in:

  • ChatMember subclasses do not have the Available in that ChatMember has, Returned in is copied correctly.

that led to last `elif` being ignored and classes
whose args were typed as strings
were not added to AppBuilder's "Use in"
* catch `NotImplementedError` propagated from
`._resolve_arg()` and show an informative
error message about which method/attr in which
class triggered the admonition generation error.
* one stray `continue` got left behind
Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

Phew, I think I'm happy with all the changes. This feature makes it almost impossible to get lost in the docs!

@harshil21 harshil21 merged commit f36ceaa into doc-fixes Jan 22, 2023
@harshil21 harshil21 deleted the shortcut-admonitions-docfixes-3496 branch January 22, 2023 11:40
@harshil21 harshil21 mentioned this pull request Jan 22, 2023
9 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2023
@Bibo-Joshi Bibo-Joshi added 🔌 enhancement pr description: enhancement and removed enhancement labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ documentation affected functionality: documentation 🔌 enhancement pr description: enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCUMENTATION] Add new admonitions to telegram classes

4 participants