This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Description
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.