Add option to hide legend by default via command-line flag or environment variable#15
Merged
Add option to hide legend by default via command-line flag or environment variable#15
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new command-line flag and environment variable to hide the legend by default.
- Removed automatic default instantiation of LegendWidget in favor of explicit configuration
- Introduced a new boolean flag "hide-legend" in main.rs and updated App initialization accordingly
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/widget_legend.rs | Removed the Default derive from LegendWidget to allow explicit configuration of the hide state |
| src/main.rs | Added flag parsing for "hide-legend" and passed the value to App::new |
| src/app.rs | Modified App::new to accept the hide_legend flag and initialize LegendWidget accordingly |
Comments suppressed due to low confidence (2)
src/widget_legend.rs:8
- [nitpick] Consider renaming 'hide' to 'is_hidden' for clearer semantics regarding its boolean nature.
pub hide: bool,
src/main.rs:15
- Ensure that the new flag and environment variable behavior is covered by tests, especially to verify the override logic with the environment variable.
let hide_legend = noargs::flag("hide-legend")
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.