-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
docs: Refactor and add test for paginated_return_data.py
#3456
base: main
Are you sure you want to change the base?
Conversation
47c57c0
to
652c43f
Compare
79327b2
to
652c43f
Compare
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3456 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think the auto format might have thrown out the line numbers by one.
Do you think we should we use literal includes for the remaining code blocks in that section?
im struggling with this because now we split into two places and increase maintenance burden around Aesthetically I would prefer the usage of Maybe we could standardize on just always showing full blocks of code, but if those are over a certain line count e.g., wont fit in half of the viewport or maybe the full length of the viewport then we chunk it into a |
docs/examples/data_transfer_objects/factory/paginated_return_data.py
Outdated
Show resolved
Hide resolved
paginated_return_data.py
paginated_return_data.py
That's ok but I'm afraid that after examples rewrite (to make them self contained) the most of them will be too long to make them visible at start and "unhiding" every example can be user unfriendly too. Let's say:
It can work similar to Slack. Take a look: We can show only If you like this idea I can look for an extension or try to implement it on my own. |
c7e8958
to
631051c
Compare
Quality Gate passedIssues Measures |
I have a quite strong opinions on the dropdowns in that I think they should almost always be avoided in reference docs when they're hiding code. The code is what these docs are talking about, so hiding it is simply obscuring one of the main pieces of information. @JacobCoffee If you don't like scrolling, we should improve the section layout / side nav. But hiding code is the worst option IMO. |
631051c
to
d7293fe
Compare
d7293fe
to
3d2e572
Compare
Quality Gate passedIssues Measures |
Description
paginated_return_data
doc exampleVisible code shows the simpliest usage of the funcionality.
The
Full code
dropdown shows the full working example code with highlighted lines.Closes