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

re_viewer welcome screen code cleanup #8784

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

brody4hire
Copy link
Contributor

Related

What

refactoring to extract welcome doc button text & color into constants

probably should have been part of PR #8745 - I didn't want to slow it down any further

OPEN QUESTION:

I considered proposing this kind of cleanup throughout the re_viewer code. From a quick look through this module gives me a serious doubt: crates/viewer/re_viewer/src/ui/memory_panel.rs

I would love to find a way to make a more data-driven approach for functions like MemoryPanel::gpu_stats & MemoryPanel::caches_stats.

Maybe best to close & reject this one for now.

@brody4hire brody4hire force-pushed the re_viewer-welcome-code-cleanup branch from 182ec42 to 70c60ce Compare January 24, 2025 17:11
…S NOT COMPILE as hex_color macro offers RGBA option that requires non-const Color32::from_rgba_unmultiplied fn
Comment on lines +14 to +21
macro_rules! color_from_rgb_hex {
($hex:literal) => {
match color_hex::color_from_hex!($hex).as_slice() {
[a, b, c] => Color32::from_rgb(*a, *b, *c),
_ => panic!("XXX"),
}
};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this should be defined in ecolor, I should be able to propose this over the weekend.

Comment on lines +48 to +49
# XXX TODO FIX THIS IMPORT:
color-hex = { version = "*", default-features = false }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to remove this in favor of defining the needed macro in ecolor. As I said in the other comment, I should be able to do this over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants