Skip to content
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

Add screenshots to documentation #832

Merged
merged 7 commits into from
Jan 23, 2025
Merged

Add screenshots to documentation #832

merged 7 commits into from
Jan 23, 2025

Conversation

PoignardAzur
Copy link
Contributor

Create include_screenshot macro

@PoignardAzur
Copy link
Contributor Author

PoignardAzur commented Jan 16, 2025

For now I've added a screenshot to the Align widget only. A full PR would add screenshots to all of them.

Follow-up work needed:

  • Checking whether the docs.rs trick actually works.
  • Checking whether this method will work with cargo rdme.
  • Making better screenshots than the ones we currently use.

@DJMcNab DJMcNab linked an issue Jan 16, 2025 that may be closed by this pull request
@PoignardAzur PoignardAzur marked this pull request as ready for review January 23, 2025 15:25
@PoignardAzur
Copy link
Contributor Author

The screenshots could stand to be improved (a lot of them are way too big), but for now this is already a marked improvement.

masonry/src/testing/screenshots.rs Outdated Show resolved Hide resolved
masonry/src/testing/screenshots.rs Outdated Show resolved Hide resolved
masonry/src/widget/align.rs Outdated Show resolved Hide resolved

## `calc_masonry`

![alt text](screenshots/calc_masonry__tests__base_screenshot.png)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should provide alt text, but if we're not going to, I think the right way to do that is to not put any in at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lean towards not including any alt text. The most obvious alt text I can think to add would either be super verbose or just a restatement of the paragraph next to it.

masonry/examples/calc_masonry.rs Outdated Show resolved Hide resolved
PoignardAzur added a commit that referenced this pull request Jan 23, 2025
Note: some of the doc depends on #832 and #848 which haven't been merged yet.
masonry/src/testing/screenshots.rs Outdated Show resolved Hide resolved
masonry/src/testing/screenshots.rs Outdated Show resolved Hide resolved
masonry/src/testing/screenshots.rs Outdated Show resolved Hide resolved
@PoignardAzur
Copy link
Contributor Author

PoignardAzur commented Jan 23, 2025

Created #851 and #852 to track follow-up work.

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This trick might be worth making a blog post on, although the LFS trickery makes it more complicated.

@PoignardAzur PoignardAzur added this pull request to the merge queue Jan 23, 2025
Merged via the queue into main with commit df3107e Jan 23, 2025
18 checks passed
@PoignardAzur PoignardAzur deleted the screenshots_in_doc branch January 23, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automating screenshots for documentation
2 participants