Fix screenshot bug bash: badges, update flow, logs, opener
Keep selected-row badges in their own colors, report preparing-updates progress per item, lock and cancel the checking phase, drop the redundant review badge, warn-style conflict reasons, defer busy-manifest reconciliation silently, share log level colors, filter log levels, page without snap-back scrolling, drag-to-copy log lines, and surface opener failures with the missing logs shortcut.
This commit is contained in:
1 parent
65edd0b31b
commit
9c54e8f321
23 files changed
+1178
-104
No files matched your search
@@ -1204,6 +1204,47 @@ fn incompatible_installed_version_renders_red_footer() {
|
||||
assert_eq!(footer_color("0.9.0+mc1.20.1"), Some(theme.error()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn warning_descriptions_render_in_warning_color() {
|
||||
let mut conflict = entry("Voxy");
|
||||
conflict.description =
|
||||
"Other selected updates require different versions of Sodium.".to_owned();
|
||||
let mut state = ContentListState {
|
||||
entries: vec![conflict],
|
||||
warning_descriptions: true,
|
||||
..ContentListState::default()
|
||||
};
|
||||
state.rebuild_display_metadata();
|
||||
let picker = ratatui_image::picker::Picker::halfblocks();
|
||||
let mut terminal = ratatui::Terminal::new(ratatui::backend::TestBackend::new(70, 5)).unwrap();
|
||||
terminal
|
||||
.draw(|frame| {
|
||||
super::render(
|
||||
frame,
|
||||
frame.area(),
|
||||
&mut state,
|
||||
true,
|
||||
"Loading...",
|
||||
"Empty",
|
||||
&picker,
|
||||
false,
|
||||
true,
|
||||
);
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
let theme = crate::config::theme::THEME.as_ref();
|
||||
let buffer = terminal.backend().buffer().clone();
|
||||
let description_color = (0..buffer.area.height).find_map(|y| {
|
||||
let row = (0..buffer.area.width)
|
||||
.map(|x| buffer[(x, y)].symbol().to_owned())
|
||||
.collect::<String>();
|
||||
row.find("Other selected")
|
||||
.map(|start| buffer[(u16::try_from(start).unwrap(), y)].fg)
|
||||
});
|
||||
assert_eq!(description_color, Some(theme.warning()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multiline_rendering_uses_the_space_beside_large_icons() {
|
||||
let mut world = entry("World");
|
||||
|
||||
Reference in new issue
Block a user