-
Notifications
You must be signed in to change notification settings - Fork 55
Description
This crate has changed a lot in the last 3 years. The images in the documentation probably aren't super accurate anymore. If you haven't seen the documentation yet, it contains images to help people understand what the example code produces. Take the set_pen_color method for example:
After the changes in #173, this image now looks like the following:
It's a subtle change, but you can see that the pen thickness is about half of what it used to be, and the lines now have circular ends instead of rectangular ends. (The thickness change is actually because the set_pen_size calls in the documentation examples weren't updated after #173...oops! Feel free to double the pen thickness as part of your changes. The images probably look better that way!)
If any of the images are significantly different or have changed in undesirable ways, we should probably fix the example instead of just updating the image. Feel free to leave a comment and we can discuss what to do.
Mentoring Instructions
The image for the documentation shown above is in docs/assets/images/docs/colored_circle.png.
The image URL is hard-coded to a permanent link in the documentation comment:
Line 732 in bf64b83
| ///  |
(Notice that the path I just told you is in this code.)
You won't be able to update that link until after the PR is merged, but I would still really appreciate some help updating the images.
Here's what you need to do to help:
- Clone the repository
- Open
examples/circle.rsin your editor- Important: We are going to be running the code using this file, but don't actually commit any of the changes we make! This is very easy to do accidentally with git.
- Copy and paste the code from the documentation into
examples/circle.rs- For example, if you were going to do this for the
set_pen_colormethod shown above, you would start by opening your local copy of theturtle.rsfile - The code on docs.rs may be out of date, so make sure to use your local copy so you don't accidentally generate the wrong image!
- Once you have
turtle.rsopen, find theset_pen_colormethod and copy and paste the lines of example code in the comment above the method - Delete the leading
///and you should get some valid Rust code - Another potentially easier method is to generate the documentation and copy and paste the code from there
- For example, if you were going to do this for the
- Run the example with
cargo run --features unstable --example circle - Wait for it to complete
- Take a screenshot of the drawing without the titlebar
- The screenshots we have had so far all have the titlebar, but this isn't great because titlebars look different on every platform/OS/theme
- Only include the titlebar if it is relevant (e.g. the image for
set_titlewould need to include the titlebar)
- Look for the right filename for your image in the markdown of the documentation you're trying to update the image for
- Replace that file in the repo
- Commit the new image
As I mentioned, you won't be able to update the URLs to their permanent links until after the PR to update the images has been merged. Please feel free to come back and help out with that in a follow-up PR! Instructions for doing this can be found in the issue where we originally made all the links into permanent links.
Checklist
-
docs/assets/images/docs/changed_title.png -
docs/assets/images/docs/orange_background.png -
docs/assets/images/docs/circle.png -
docs/assets/images/docs/circle_offset_center.png -
docs/assets/images/docs/circle.png -
docs/assets/images/docs/small_drawing.png -
docs/assets/images/docs/squares.svg- Updated URL needs
?sanitize=trueat the end
- Updated URL needs
-
docs/assets/images/docs/color_mixing.png -
docs/assets/images/docs/pen_thickness.png -
docs/assets/images/docs/colored_circle.png -
docs/assets/images/docs/red_circle.png -
docs/assets/images/docs/clear_before_click.png -
docs/assets/images/docs/clear_after_click.png

