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 - landing page Layout section is out of place -> not newcomer friendly #512
Comments
Thanks, this is some great feedback. Writing better docs is something that we're all working on. We'd appreciate any assitance you can spare to help wrangle some of this into order (whether that's via feedback or PRs). If you haven't already found the following, these resources are available:
Ideally these should be better cross linked in all the right places so concretely we need to:
Happy to hear more suggestions on this / take PRs if you're interested in helping out. |
Thanks! I will look into it. I'd like to contribute back when I get a hang of the project. Because the examples look pretty good. It's just a pity they are a bit hidden. I hope that the suggested solution here will soon become a reality Because it's pretty much standard in other languages (e.g. python->Sphinx) |
If you like the look of the current examples, check out PR #500 for some inspiration. Rendered versions of the examples (in the examples Readme) have only been since the end of July PR #303 - before that you had to run the examples yourself to see what they looked like. I actually want this to go a few steps further and use the rendered examples directly in the docs.
One of the major things that dictates a separate repo rather than just the docs.rs api docs for us is that the speed of iteration on docs is 1-2 of magnitude faster than of the library. (78 PRs merged since June when the book started compared with just 3 releases of ratatui in the last 4 months). We won't be moving away from having a book, but we'll definitely try to keep the right sort of linkage between them.
That does sound neat for some things. Clap is an example that the docs.rs approach leads to something
Sounds interesting. |
I kind of agree that this page https://docs.rs/ratatui/latest/ratatui/ is not a good landing page for a new user. Everything between Lines 8 to 163 in dd9a8df
could be replaced with two links:
And it would be a much better onboarding experience for users of any level of experience (imo). |
For reference, clap's landing page: has links to start off with + one code example with no explanations (which I like) further down the page. It gives people as idea of what kind of syntax is required to use this package just to recognize patterns without any deeper prose or explanations (for example, we talk about crossterm and termion and terminal backends in the first few lines; the example has a thread spawn with event read which probably no one will use in real code; there's a line at the end about computed layouts and blank spaces; etc which is all not required for users or potential users that are just landing on the page for the first time). Serde goes one step further: no code examples on the landing page + a single line that tells users to do to https://serde.rs for additional examples (which happens to be a mdbook generated website): I really like that approach. |
Some subjective observations:
The docs / readme don't need Cargo.toml examples or info on alternate backend config. That belongs elsewhere. |
Please also keep the text editor side in mind. The main way I interact with the documentation is through an |
Good call out - can you screenshot some examples? It would be helpful to have an example of how the docs render right now via the LSP. |
Neat. Thanks :) |
Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. Fixes: #512
Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. Fixes: #512
Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. Fixes: #512
Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. - add docsrs example, vhs tape and images that will end up in the README Fixes: #512
Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. - add docsrs example, vhs tape and images that will end up in the README Fixes: #512
* docs: make library and README consistent Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. - add docsrs example, vhs tape and images that will end up in the README Fixes: #512
* docs: make library and README consistent Generate the bulk of the README from the library documentation, so that they are consistent using cargo-rdme. - Removed the Contributors section, as it is redundant with the github contributors list. - Removed the info about the other backends and replaced it with a pointer to the documentation. - add docsrs example, vhs tape and images that will end up in the README Fixes: ratatui-org#512
Description
As a newcomer to Rust and Ratatui, I go to the documentation page https://docs.rs/ratatui/latest/ratatui/
The first few lines show perfect examples of what I can do with the library, then follow the minimal working example.
But then the
Layout
section contains some functionui()
which explains how elements are composed,however, the function example is completely disconnected from the previous code block, which makes it hard to grasp what is going on without diving deeper into the code.
Expected behavior
I'd expect the landing page to either provide a complete example or at least point me in the direction of examples.
Pointing to examples should not just be a text, but rather a link to a repo or page which explains more details about how to use
the library.
The text was updated successfully, but these errors were encountered: