You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
Some discussions around how we can provide both examples and an API reference for Hip when there are namespaces with very similar but obviously have basically two separate audiences.
A great idea from @njsmith was to do something similar to a lot of projects that support multiple programming languages (Python, Java, Ruby, etc) and have a "Sync / Async" toggle on documentation navigation. Would change all code examples and autodoc refs from ahip to hip, have/exclude async/await etc.
This would be especially useful for the reference as it will be mostly symmetrical thanks to unasync.
Some thoughts and ideas that came up:
When you're on a sync / async page toggling the slider should bring you to the corresponding page and restore your scroll position on the new page.
The toggle can probably be a piece of JavaScript that does URL rewriting as long as the doc URLs are symmetric (/ref/async/... to /ref/sync/...)
Could use fragments, scroll %, a combination of both to restore scroll position?
There will probably be a need for being able to mark sections as "sync-only" and "async-only" for gotchas, tips, limitations, etc
Should this slider be extended to Sync, Trio, Asyncio, Curio?
Some examples will probably want to use specific APIs like trio.run() or trio.open_nursery()
for showing off how to do multiple concurrent requests.
The text was updated successfully, but these errors were encountered:
When you choose a different language, all other snippets in the page automatically show that language.
This specific extension does not degrade gracefully: without JS we only see the first tab instead of seeing all of them. I guess that's fixable. But at least that's a solution that already works today.
Should this slider be extended to Sync, Trio, Asyncio, Curio?
I guess ultimately including all frameworks we support is nice because I prefer code snippets that can be run as-is. It shouldn't be too hard as everything should be generated anyway. But it's not mandatory either, just a nice touch.
Some discussions around how we can provide both examples and an API reference for Hip when there are namespaces with very similar but obviously have basically two separate audiences.
A great idea from @njsmith was to do something similar to a lot of projects that support multiple programming languages (Python, Java, Ruby, etc) and have a "Sync / Async" toggle on documentation navigation. Would change all code examples and autodoc refs from
ahip
tohip
, have/excludeasync/await
etc.This would be especially useful for the reference as it will be mostly symmetrical thanks to unasync.
Some thoughts and ideas that came up:
/ref/async/...
to/ref/sync/...
)trio.run()
ortrio.open_nursery()
for showing off how to do multiple concurrent requests.
The text was updated successfully, but these errors were encountered: