Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions masonry_core/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ The screenshots are stored using git LFS, which adds some minor complications bu

We include some of the screenshots in the documentation; because `docs.rs` doesn't have access to LFS files, we use the `include_screenshot!` to instead link to `https://media.githubusercontent.com` when building doc for `docs.rs`.

**Note:** The above may or may not be true at the time you read this document.
We've had problems with the `docsrs` flag and Github's handling of LFS files.
See also https://github.com/linebender/xilem/issues/851.

## VS Code markers

Masonry uses VS Code markers to help users browse code with the minimap:
Expand Down
17 changes: 17 additions & 0 deletions masonry_core/src/testing/screenshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@

use image::{GenericImageView as _, Pixel as _, Rgb, RgbImage};

// FIXME - We're essentially completely disabling screenshots, period.
// Hopefully we'll be able to re-enable them soon.
// See https://github.com/linebender/xilem/issues/851

#[doc(hidden)]
#[macro_export]
macro_rules! include_screenshot {
($path:literal $(, $caption:literal)? $(,)?) => {
// On docsrs we just remove the screenshot links for now.
" "
};
}

// TODO - Re-enable this once we find a way to load screenshots that doesn't go against our
// storage quotas.
#[cfg(FALSE)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rust-lang/rust#138632

cfg(false) should be stable in 6 weeks!

#[cfg(docsrs)]
#[doc(hidden)]
#[macro_export]
Expand All @@ -19,6 +35,7 @@ macro_rules! include_screenshot {
};
}

#[cfg(FALSE)]
#[cfg(not(docsrs))]
#[doc(hidden)]
#[macro_export]
Expand Down