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

[pure refactor] move data ui to new re_data_ui crate #2048

Merged
merged 9 commits into from May 5, 2023
Merged

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented May 4, 2023

Introduces a new crate re_data_ui which depends on re_viewer_context and is in turn used by re_viewer.

This didn't go nowhere nearly as smoothly as expected. I had to move more things into re_viewer_context for the time being than I wanted, but nothing too outrageous. It does make re_viewer_context quite a lot bigger though than I wanted. The main issue was around supporting tensor ui in re_data_ui - due to the way data ui is setup up, the orphan rule right now forces us to put all data ui into re_data_ui.
On the bright side, the things moved make the main viewer crate once more leaner, making it easier to move more.

Part of:

What

Checklist

PR Build Summary: https://build.rerun.io/pr/2048

@Wumpf Wumpf added 📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality labels May 4, 2023
@Wumpf Wumpf marked this pull request as draft May 4, 2023 17:57
@Wumpf Wumpf changed the base branch from main to andreas/move-viewer_context May 4, 2023 17:57
Base automatically changed from andreas/move-viewer_context to main May 5, 2023 07:17
@Wumpf Wumpf marked this pull request as ready for review May 5, 2023 07:19
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.

I'm not too happy about select_hovered_on_click dissappearing and being spread around the code base. It's not the code duplication, it is the repeated logic that will make it more difficult to change what happens on cmd-click, shift-click, etc.

On another note: have you tried running cargo machete to find unused dependencies?

crates/re_data_ui/README.md Outdated Show resolved Hide resolved
crates/re_data_ui/src/item_ui.rs Show resolved Hide resolved
crates/re_viewer/src/ui/view_spatial/ui.rs Outdated Show resolved Hide resolved
Comment on lines +18 to +19
// TODO(andreas): Move to its own crate?
pub mod gpu_bridge;
Copy link
Member

Choose a reason for hiding this comment

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

the thought has occurred to me too - a re_renderer <-> re_log_types bridge crate.

@Wumpf
Copy link
Member Author

Wumpf commented May 5, 2023

On another note: have you tried running cargo machete to find unused dependencies?

did now and found a lil bit :)

@Wumpf Wumpf merged commit 6c14940 into main May 5, 2023
15 checks passed
@Wumpf Wumpf deleted the andreas/re_data_ui branch May 5, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants