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

Docs inline viewer infrastructure #5438

Merged
merged 32 commits into from
Mar 17, 2024
Merged

Docs inline viewer infrastructure #5438

merged 32 commits into from
Mar 17, 2024

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Mar 8, 2024

Snippets™️ (formerly known as "code examples" or "doc examples") are now built on CI together with Examples™️, and uploaded to the same place.

Also includes some changes to example screenshots (adding data-inline-viewer attributes), and updating the egui rev to fix a bug

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@jprochazk jprochazk added 📖 documentation Improvements or additions to documentation exclude from changelog PRs with this won't show up in CHANGELOG.md 🚢 CI labels Mar 8, 2024
@jprochazk jprochazk marked this pull request as draft March 8, 2024 10:35
Copy link

github-actions bot commented Mar 13, 2024

Size changes

Name main 5438/merge Change
arkit_scenes.rrd 39.43 MiB 40.34 MiB +2.31%

@jprochazk jprochazk changed the title Build snippets on CI Docs inline viewer infrastructure Mar 14, 2024
@jprochazk
Copy link
Member Author

jprochazk commented Mar 14, 2024

I did all the renaming in 521415f and onward (though there are some mentions of "snippet" mixed in the earlier commits). Hopefully it's a bit easier to review this way.

@jprochazk jprochazk marked this pull request as ready for review March 14, 2024 10:42
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Looks good, except the double panic hook

It would have been easier to review if the "code-example -> snippet" renaming had come in its own PR though

.github/actions/deploy-vercel/action.yml Outdated Show resolved Hide resolved
Comment on lines 51 to 52

if !path.extension().is_some_and(|p| p == "py") {
Copy link
Member

Choose a reason for hiding this comment

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

giving complex expressions a name can greatly improve readability

Suggested change
if !path.extension().is_some_and(|p| p == "py") {
let has_python_extension = path.extension().is_some_and(|p| p == "py");
if !has_python_extension {

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this one is already pretty readable, putting it into a variable feels like I'm repeating myself

crates/re_build_examples/src/snippets.rs Show resolved Hide resolved
docs/README.md Show resolved Hide resolved
crates/re_log/src/setup.rs Outdated Show resolved Hide resolved
crates/re_log/Cargo.toml Outdated Show resolved Hide resolved
@jprochazk
Copy link
Member Author

It would have been easier to review if the "code-example -> snippet" renaming had come in its own PR though

I just wanted to get it over with, because after this PR we would have:

  • Code example
  • Doc example
  • Snippet

All mean the same thing.

@emilk emilk merged commit 4982c01 into main Mar 17, 2024
39 checks passed
@emilk emilk deleted the jan/prepare-code-examples branch March 17, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation exclude from changelog PRs with this won't show up in CHANGELOG.md 🚢 CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants