Skip to content

Commit

Permalink
Merge example page into welcome screen (#5329)
Browse files Browse the repository at this point in the history
### What

- Part of #4961
- Closes #3244

Changes:
- Updated design of thumbnails on example page to match
https://rerun.io/examples
- Updated some spacing on welcome screen to better match design from
#3244
- Remove loading spinners on example page thumbnails
- Remove tabs on welcome screen + remove the examples welcome screen
card + the whole mechanism of switching between the welcome screen and
example page
- Move example page contents below welcome screen
- If example page is not visible, indicate their presence with a
floating `See examples` button, which may be clicked to scroll the
examples page into view

I have not done anything to change the loading behavior, or added any
extra effects as the example page loads in. There are also a few things
in #4961 not done in this PR, such as updating the copy or merging the
quick start examples.


![image](https://github.com/rerun-io/rerun/assets/1665677/173cbfd6-4f5d-43d8-8b91-e01aa0519376)

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5329/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5329/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5329/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5329)
- [Docs
preview](https://rerun.io/preview/b23e7aa1a53bc82682b6327c95b56fd600c09a99/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/b23e7aa1a53bc82682b6327c95b56fd600c09a99/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
jprochazk authored Feb 29, 2024
1 parent 21caf31 commit 1643db8
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 301 deletions.
Binary file added crates/re_ui/data/icons/arrow_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions crates/re_ui/src/design_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ fn apply_design_tokens(ctx: &egui::Context) -> DesignTokens {
egui_style
.text_styles
.insert(ReUi::welcome_screen_h3(), egui::FontId::proportional(15.0));
egui_style.text_styles.insert(
ReUi::welcome_screen_example_title(),
egui::FontId::proportional(16.0),
);
egui_style.text_styles.insert(
ReUi::welcome_screen_body(),
egui::FontId::proportional(13.0),
Expand Down
2 changes: 2 additions & 0 deletions crates/re_ui/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub const ARROW_RIGHT: Icon = Icon::new(
"arrow_right",
include_bytes!("../data/icons/arrow_right.png"),
);
pub const ARROW_DOWN: Icon =
Icon::new("arrow_down", include_bytes!("../data/icons/arrow_down.png"));
pub const LOOP: Icon = Icon::new("loop", include_bytes!("../data/icons/loop.png"));

pub const RIGHT_PANEL_TOGGLE: Icon = Icon::new(
Expand Down
5 changes: 5 additions & 0 deletions crates/re_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ impl ReUi {
egui::TextStyle::Name("welcome-screen-h3".into())
}

#[inline]
pub fn welcome_screen_example_title() -> egui::TextStyle {
egui::TextStyle::Name("welcome-screen-example-title".into())
}

#[inline]
pub fn welcome_screen_body() -> egui::TextStyle {
egui::TextStyle::Name("welcome-screen-body".into())
Expand Down
Loading

0 comments on commit 1643db8

Please sign in to comment.