-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
ReUi
and move its methods to egui::{Ui|Context}
extension …
…traits and to `DesignTokens` (#6506) ### What * Closes #4569 This PR: - Introduces `UiExt` and `ContextExt` extension traits for `egui::Ui`, resp. `egui::Context`. - Refactor `DesignTokens` such that it's globally available via `re_ui::design_token()`. - A new `re_ui::apply_style_and_install_loaders(&egui::Context)` function is introduced to initialise Rerun style in egui. - `ReUi` is removed, and it's methods are dispatched to `DesignTokens`, `ContextExt`, and `UiExt`, depending on their nature. - All `re_ui::ReUi` references are removed from the code base. Some structures which formerly held a `ReUi` now hold a `egui::Context` instead (including `App` and `ViewerContext`). - Added some rules to `clippy.toml` to forbid the use of some `egui` functions/type that are replaced by our own (e.g. `checkbox()` and `radio_value()`). Cleaned up a redundant lint to that effect in `scripts/lint.py`. ### 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 examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6506?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6506?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/6506) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information
Showing
83 changed files
with
2,628 additions
and
2,906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.