Skip to content

docs: Improve API doc groups #1309

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

Merged
merged 3 commits into from
Jul 18, 2025
Merged

docs: Improve API doc groups #1309

merged 3 commits into from
Jul 18, 2025

Conversation

vdusek
Copy link
Collaborator

@vdusek vdusek commented Jul 16, 2025

Description

Render of the whole page:

image

I am open to any suggestions for better grouping it. Maybe we can even hide something from "Others"?

Issues

Testing

  • Docs rendered locally.

Checklist

  • CI passed

@vdusek vdusek added this to the 119th sprint - Tooling team milestone Jul 16, 2025
@vdusek vdusek self-assigned this Jul 16, 2025
@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Jul 16, 2025
Copy link
Collaborator

@Mantisus Mantisus left a comment

Choose a reason for hiding this comment

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

It looks great!

Maybe we should also add a Middlewares group, currently, there is only CrawlerInstrumentor. However, I think there may be more in the future.

@@ -12,7 +12,7 @@
RequestHandler = Callable[[TCrawlingContext], Awaitable[None]]


@docs_group('Classes')
@docs_group('Others')
class Router(Generic[TCrawlingContext]):
Copy link
Collaborator

@Mantisus Mantisus Jul 16, 2025

Choose a reason for hiding this comment

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

I'm not sure about the Others group for Router.

But I'm not sure which group would be better

Copy link
Collaborator

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

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

Cool, I like it

'Functions',
'HTTP clients',
'HTTP parsers',
'Others',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we use a singular (Other) here and also move it to the bottom of the class list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to "Other". However, the sequence defined in GroupName doesn't affect the order in the rendered page.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I know, but I don't know where to change this to actually change the order 😁 Could you please give it a try?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Group sorting is implemented in the docusaurus-plugin-typedoc-api. @barjin will do the changes, and once that's done, we can bump the package version here.

@Pijukatel
Copy link
Collaborator

Nice, this is way more readable. I was looking at Others trying to see some pattern and maybe two more categories could be extracted:

Resource Management?
AutoscaledPool, ConcurencySettings, Snapshotter, SystemStatus

Request customization?
CookieParam, HeaderGenerator, SessionPool, HttpHeaders, ProxyConfiguration???, ProxyInfo???, Session, BrowserforgeFingerprintGenerator, SessionCookies

@vdusek
Copy link
Collaborator Author

vdusek commented Jul 17, 2025

Sorry, I added an outdated image to the PR description. This is the current state (so I'm not sure Pepa about your suggestions):

image

@vdusek
Copy link
Collaborator Author

vdusek commented Jul 17, 2025

Maybe we should also add a Middlewares group, currently, there is only CrawlerInstrumentor. However, I think there may be more in the future.

Hmm, maybe let's do it in the future when we have more "middlewares".

I'm not sure about the Others group for Router. But I'm not sure which group would be better

Yeah, I'd also like to put it somewhere, but I have no idea where :D.

@vdusek vdusek requested review from janbuchar and Mantisus July 17, 2025 13:22
Copy link
Collaborator

@Pijukatel Pijukatel left a comment

Choose a reason for hiding this comment

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

I think it is big improvement over the current state.

@vdusek vdusek merged commit 0fe8312 into master Jul 18, 2025
18 of 19 checks passed
@vdusek vdusek deleted the improve-api-docs-groups branch July 18, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve grouping in API docs
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy