-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Swap the naming of Viewport and ViewportBlueprint (#2595)
### What In the process of plumbing new State through for things like auto-properties I found myself getting very mixed up with the organization and naming related to Viewport and Blueprint. Previously ViewportBlueprint contained an internal "Viewport". This flips the naming to make Viewport the the top-level container, with separate internals members for `blueprint` and `state`: ``` pub struct Viewport<'a, 'b> { pub blueprint: ViewportBlueprint<'a>, pub state: &'b mut ViewportState, } ... let mut viewport = Viewport::from_db(store_context.blueprint, viewport_state); ``` The idea is the *Blueprint* represents the entity stored in the databse, while the *Viewport* represents the thing shown in the viewer, which users the blueprint as part of its display logic. I also split the ui related functions for the blueprint into a separate `viewport_blueprint_ui.rs`. Sadly, this diff ended up quite ugly since I both swapped the names of the structs and the corresponding files. ### 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)~~ Refactor-only * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2595) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2595) - [Docs preview](https://rerun.io/preview/pr%3Ajleibs%2Fmore_viewport_refactor/docs) - [Examples preview](https://rerun.io/preview/pr%3Ajleibs%2Fmore_viewport_refactor/examples)
- Loading branch information
Showing
8 changed files
with
834 additions
and
793 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
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.