mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Improve analytics chart readability and navigation (#45770)
## Why Reading daily totals required selecting each bar, and changing grouping required opening a picker. Section navigation could shift vertically, while scroll hints appeared even when content fit. ## What changed - Make `g` cycle through available groupings and summary views directly. - Show daily totals on charts spanning up to seven days when space permits, prioritizing the selected value and keeping neighboring labels separate. - Keep section navigation at a stable height, show more legend rows in taller maximized reports, and move their update timestamp into the footer. - Hide scroll hints when content fits, including an exact fit, and show only the active summary view label. ## Testing Add regression tests and snapshots for seven-day totals, narrow label spacing, grouping wraparound and server capabilities, configured `g` navigation in ungrouped sections, stable tab placement, adaptive legends, footer timestamps, and overflow-dependent scroll hints. GitOrigin-RevId: 9d14f314b4a22ca2d926f0e69c6b89e4f9c8550d
This commit is contained in:
1 parent
9bd49c9dcc
commit
de40696ec4
92 files changed
+1474
-1214
No files matched your search
@@ -58,27 +58,9 @@ impl AnalyticsView {
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
let mut selection;
|
||||
let selection;
|
||||
let mut chart_bands = 0;
|
||||
if focused && let Some(choice) = self.group_picker {
|
||||
lines.extend(
|
||||
self.group_options()
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(index, group)| {
|
||||
let label = format!(
|
||||
"{} {}",
|
||||
if index == choice { "›" } else { " " },
|
||||
self.group_label(section, *group)
|
||||
);
|
||||
if index == choice {
|
||||
label.set_style(accent_style()).into()
|
||||
} else {
|
||||
label.into()
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
if section == Section::Summary {
|
||||
selection = 0..1;
|
||||
lines.extend(self.summary_lines(width));
|
||||
@@ -100,9 +82,7 @@ impl AnalyticsView {
|
||||
lines.extend(history.lines);
|
||||
selection = 0..lines.len();
|
||||
}
|
||||
if focused && self.group_picker.is_some() {
|
||||
selection = 0..2 + self.group_options().len();
|
||||
}
|
||||
|
||||
let mut wrapped = Vec::new();
|
||||
let mut wrapped_selection = 0..0;
|
||||
for (index, line) in lines.into_iter().enumerate() {
|
||||
|
||||
Reference in new issue
Block a user