some ux improvements to push#213
Open
john (j13huang) wants to merge 2 commits into
Open
Conversation
Contributor
|
Latest downloadable build artifacts for this PR commit
Available artifact names
|
Contributor
|
Swapping Cedric / ViaDézo1er (@viadezo1er) in for me since I haven't touched the CLI in a while and am out of date on it. |
Contributor
|
diff --git a/src/functions/pull.rs b/src/functions/pull.rs
index 8f2e6de..0b51ef2 100644
--- a/src/functions/pull.rs
+++ b/src/functions/pull.rs
@@ -1410,7 +1410,7 @@ fn format_py_value_inner(value: &Value, depth: usize) -> String {
let closing_indent = " ".repeat(depth);
let mut out = String::from("{\n");
let mut entries = object.iter().collect::<Vec<_>>();
- entries.sort_by(|(left, _), (right, _)| left.cmp(right));
+ entries.sort_by_key(|(left, _)| *left);
for (index, (key, val)) in entries.into_iter().enumerate() {
out.push_str(&indent);
out.push_str(&serde_json::to_string(key).unwrap_or_else(|_| "\"\"".to_string()));
diff --git a/src/sql.rs b/src/sql.rs
index 4e4b4ac..f6619e4 100644
--- a/src/sql.rs
+++ b/src/sql.rs
@@ -258,11 +258,10 @@ fn handle_key_event(
KeyCode::End => app.move_end(),
KeyCode::Up => app.history_prev(),
KeyCode::Down => app.history_next(),
- KeyCode::Char(ch) if !key.modifiers.contains(KeyModifiers::CONTROL) => {
- if !key.modifiers.contains(KeyModifiers::ALT) {
+ KeyCode::Char(ch) if !key.modifiers.contains(KeyModifiers::CONTROL)
+ && !key.modifiers.contains(KeyModifiers::ALT) => {
app.insert_char(ch);
}
- }
_ => {}
}
diff --git a/src/traces.rs b/src/traces.rs
index 94e0b3d..c136548 100644
--- a/src/traces.rs
+++ b/src/traces.rs
@@ -2084,8 +2084,8 @@ fn handle_span_detail_key(
}
}
}
- KeyCode::Char('d') if key.modifiers.contains(KeyModifiers::CONTROL) => {
- if app.detail_pane_focus == DetailPaneFocus::Detail {
+ KeyCode::Char('d') if key.modifiers.contains(KeyModifiers::CONTROL)
+ && app.detail_pane_focus == DetailPaneFocus::Detail => {
if detail_message_list_mode {
if app.detail_view == DetailView::Thread {
for _ in 0..10 {
@@ -2100,7 +2100,6 @@ fn handle_span_detail_key(
scroll_detail_down_bounded(app, 10)
}
}
- }
_ => {}
}
Ok(())
@@ -5229,11 +5228,10 @@ fn parse_trace_url(input: &str) -> Result<ParsedTraceUrl> {
parsed.span_id = Some(value.to_string());
}
}
- "tvt" => {
- if !value.is_empty() {
+ "tvt"
+ if !value.is_empty() => {
parsed.trace_view_type = Some(value.to_string());
}
- }
_ => {}
}
} |
Contributor
|
After |
Contributor
|
Nitpicks but easy to fix (run the command/throw the warning at the llm). |
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.
Some things: