-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Documentation #772
Comments
I've been noticing some critical documentation needs too. In particular, the styling aspect of It might make sense to start defining what base |
Already in the works https://github.com/iced-rs/iced-rs-docs, good docs just takes time. Please be patient. |
@13r0ck Sounds great. I can fork the project, make a .md page, and just write down what I've discovered so far. I'll make a PR so that we can talk back and forth about the topic and I'll probably learn a lot of things as well. |
I mostly rely on documentation, even
man
,--help
and stuff. I'm also using Arch Linux for quite a few years now, and I really believe people should read the docs and learn how to do stuff instead of asking others and copy-pasting stuff. But for that the docs need to actually have information needed. I am going through the examples in the iced repo and I think they're amazing, but even then I'm still having quite a it of trouble, especially with types, which type is returned by this or that thing, etc. Plus I love the idea of isolating state and being as functional as possible, but even though I'm looking pretty hard for ways to split stuff into modules and how to isolate state and stuff, it's been an uphill battle to cross-reference the code in the examples, the little info on the docs, and the errors my compiler produces pretty much every time I write anything.I took a look at the issues to check if and how many others had similar issues and it seems a considerable number of issues can be solved with better documentation, as opposed to bugs or features. Now, I'd love to help with that but I'm still learning Rust. Even so, I do have some suggestions on how to improve this mess.
public static void
stuff and I'm pretty sure there are a lot of people with a lot less experience with types. Couple rust type annotations being written after the function definitions with the nested<>
from hell in type annotations, and the lack of type annotations or instructions on why they shouldn't be necessary in the first place makes it quite a bit harder to work with iced.sruct
named after the application, and those values are initialized by thenew
method in theimpl Application for
, but I learned this and pretty much everything else by reading through the examples and trying stuff out, when the docs could make it more obvious thatMessages
keep the functions that the GUI calls and functions that modify the GUI, state is in your app'sstruct
etc.I believe those should be fairly easy to do, and could already be a big help. Especially some explanations on the structure (And how this structure is translated on the example apps, more comments there would help a lot), and how to split logic if necessary (i.e., if I have too many screens and want to have a separate file just to build the views, how should I organize it? Or what if I wanna keep the state upon closing, so the user can continue from where they left off, how could I deal with that saving/loading?
This stuff probably seems trivial for people who are more experienced with Rust, but I think that's exactly why this stuff should be added to the Documentation: Because it's easy to add for people who are writing the documentation, and not writing it will most likely result in an increase of issues created which in turn will take a lot longer to deal with.
Beginners will still have trouble with mutable stuff and whatnot (At least I believe I will, for a while), but that's exactly the reason why I believe documentation and examples should have more details on types and stuff, because I shouldn't need to read through iced's code or a bunch of compiler errors to figure out what each type returns, and the maintainer shouldn't have to waste time explaining stuff for a small number of people in the issues as opposed to just adding that to the docs.
The text was updated successfully, but these errors were encountered: