-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add "Inspect" section to display debug values #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great feature!
I have yet to give it a test, but I already have a bit of a gripe with name configurability: I'd much rather do without. I do agree that "Debug" may sound a bit too low-level/"scary" for something that might show up in release/final sketches. Instead, we could name the panel "Inspect" and the function ctx.inspect()
.
crates/whiskers/src/runner/mod.rs
Outdated
@@ -17,6 +18,7 @@ use std::sync::Arc; | |||
use crate::Sketch; | |||
pub use animation::AnimationOptions; | |||
use convert_case::Casing; | |||
pub use debug::DebugOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not pub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here it's pub
because it's used by the context. but I removed it from lib.rs
and prelude.rs
. is it ok?
As a user, I'd still opt for a rename possibility (inspect sounds less alarming, but still in a "checking if everything's fine" manner rather than presenting program's valid features). And if not via the runner's method, then maybe with |
This really feels like API clutter, regardless of where it lives. What's the use case here? What problem would that solve? |
just a customization option, but I won't fight for it |
ah, forgot to add a label for the PR, sorry 🙏🏻 |
No prob, I'm not even sure they are settable by external contributors 🤷🏻 |
Sorry for the humongous delay! 🙏🏻 |
ctx.inspect()
✅