zeta: Adjust reviewing UI (#21932)
Most notably, adding a title bar-ish in the left column as so to add the "from most recent to oldest" info, which is supposed to make scanning the list of completions easier to do (at least it would've helped me figure out that was sorted that way when I was wondering about it!). <img width="800" alt="Screenshot 2024-12-12 at 16 24 36" src="https://github.com/user-attachments/assets/1acc9951-3df0-4cd2-96ff-94ed555ecae5" /> Release Notes: - N/A
This commit is contained in:
parent
0b4495a920
commit
096bbfead5
1 changed files with 81 additions and 50 deletions
|
@ -377,17 +377,24 @@ impl RateCompletionModal {
|
|||
.gap_2()
|
||||
.border_y_1()
|
||||
.border_color(border_color)
|
||||
|
||||
.child(
|
||||
Icon::new(IconName::Info)
|
||||
.size(IconSize::XSmall)
|
||||
.color(Color::Muted)
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.w_full()
|
||||
.pr_2()
|
||||
.flex_wrap()
|
||||
.child(
|
||||
Label::new("Ensure you explain why this completion is negative or positive. In case it's negative, report what you expected instead.")
|
||||
.size(LabelSize::Small)
|
||||
.color(Color::Muted)
|
||||
)
|
||||
)
|
||||
)
|
||||
})
|
||||
.when_some((!rated).then(|| ()), |this, _| {
|
||||
this.child(
|
||||
|
@ -435,7 +442,7 @@ impl RateCompletionModal {
|
|||
.size(IconSize::Small)
|
||||
.color(Color::Warning),
|
||||
)
|
||||
.child(Label::new("Completion wasn't shown because another valid completion was already on screen").color(Color::Warning)),
|
||||
.child(Label::new("Completion wasn't shown because another valid one was already on screen.")),
|
||||
)
|
||||
} else {
|
||||
Some(label_container())
|
||||
|
@ -457,7 +464,7 @@ impl RateCompletionModal {
|
|||
.disabled(rated || feedback_empty)
|
||||
.when(feedback_empty, |this| {
|
||||
this.tooltip(|cx| {
|
||||
Tooltip::text("Explain why this completion is bad before reporting it", cx)
|
||||
Tooltip::text("Explain what's bad about it before reporting it", cx)
|
||||
})
|
||||
})
|
||||
.on_click(cx.listener(move |this, _, cx| {
|
||||
|
@ -517,13 +524,35 @@ impl Render for RateCompletionModal {
|
|||
.rounded_lg()
|
||||
.shadow_lg()
|
||||
.child(
|
||||
div()
|
||||
.id("completion_list")
|
||||
v_flex()
|
||||
.border_r_1()
|
||||
.border_color(border_color)
|
||||
.w_96()
|
||||
.h_full()
|
||||
.flex_shrink_0()
|
||||
.overflow_hidden()
|
||||
.child(
|
||||
h_flex()
|
||||
.px_2()
|
||||
.py_1()
|
||||
.justify_between()
|
||||
.border_b_1()
|
||||
.border_color(border_color)
|
||||
.child(
|
||||
Icon::new(IconName::ZedPredict)
|
||||
.size(IconSize::Small)
|
||||
)
|
||||
.child(
|
||||
Label::new("From most recent to oldest")
|
||||
.color(Color::Muted)
|
||||
.size(LabelSize::Small),
|
||||
)
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.id("completion_list")
|
||||
.p_0p5()
|
||||
.h_full()
|
||||
.overflow_y_scroll()
|
||||
.child(
|
||||
List::new()
|
||||
|
@ -559,6 +588,7 @@ impl Render for RateCompletionModal {
|
|||
})
|
||||
.child(
|
||||
v_flex()
|
||||
.pl_1p5()
|
||||
.child(Label::new(completion.path.to_string_lossy().to_string()).size(LabelSize::Small))
|
||||
.child(Label::new(format!("{} ago, {:.2?}", format_time_ago(completion.response_received_at.elapsed()), completion.latency()))
|
||||
.color(Color::Muted)
|
||||
|
@ -570,6 +600,7 @@ impl Render for RateCompletionModal {
|
|||
}))
|
||||
},
|
||||
)),
|
||||
)
|
||||
),
|
||||
)
|
||||
.children(self.render_active_completion(cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue