new cols layout
[?]
Jun 10, 2025, 8:21 AM
I2AG42PAVOII4V4TWDJV5ZVNDIHKBRDT254BFQLFUIY723TW6CCQCDependencies
- [2]
6YZAVBWUInitial commit - [3]
KLR5FRIBadd fs state read/write of repos - [4]
IQDCHWCPload a pijul repo - [5]
WT3GA27Padd cursor with selection - [6]
YBJRDOTCmake all repo actions async - [7]
KM5PSZ4Awatch repo once loaded - [8]
2VUX5BTDload identity - [9]
A5YBC77Vrecord! - [10]
4WO3ZJM2show untracked files' contents - [11]
3SYSJKYLadd app icon - [12]
23SFYK4Qbig view refactor into a new crate - [13]
OPXFZKEBview tests setup - [14]
3QVNMRNMtest non-empty repo app view - [15]
MYGIBRRHwip custom theme - [16]
XSZZB47Urefactor stuff into lib - [17]
3BK22XE5add a test for hover btn and more refactors - [18]
WGID4LS4absolutely slayed testing with iced task - [19]
VCNKFNUFapp init test - [20]
FVA36HBVrestart repo manager task if it crashes - [21]
X6AK4QPXfinish recording test - [22]
UF5NJKAStest load repo - [23]
7SSBM4UQview: refactor repo view - [24]
2LWMGRUMtest diff - [25]
QYDWH7KBtest add and rm - [26]
5FVZF7XXtest changed files - [27]
S2T7RUKWadd nav back placeholder - [28]
I56UGW7Umake record test, fix log update - [29]
S2NVIFXRallow to enter record msg - [30]
SWDPAGF6test channel name - [31]
NRCUG4R2load changed files src when selected - [32]
VOFP2YNQprettify - [33]
KMB6FND3test view update fn rather than direct fn calls - [34]
UB2ITZJSrefresh changed files on FS changes - [35]
ELG3UDT6allow to rm added files - [36]
D7A7MSIHallow to defer or abandon record, add buttons - [37]
AMPZ2BXKshow changed files diffs (only Edit atm) - [38]
FDDPOH5Radd arrow controls - [39]
ZVI4AWERwoot contents_diff - [40]
L6KSEFQImove cursor related stuff into its module - [41]
BFN2VHZSrefactor file stuff into sub-mod - [42]
ACDXXAX2refactor main's updates into smaller fns
Change contents
- replacement in libflorescence/src/testing.rs at line 34
unsafe { std::env::set_var("PIJUL_CONFIG_DIR", &dir.path().as_os_str()) };unsafe { std::env::set_var("PIJUL_CONFIG_DIR", dir.path().as_os_str()) }; - replacement in libflorescence/src/repo/test.rs at line 67
.last().next_back() - replacement in libflorescence/src/repo/test.rs at line 128
diff.changes.get(0).unwrap(),diff.changes.first().unwrap(), - replacement in libflorescence/src/repo/test.rs at line 178
diff.changes.get(0).unwrap(),diff.changes.first().unwrap(), - replacement in justfile at line 31
cargo +{{nightly}} clippycargo +{{nightly}} clippy --all-targets - edit in inflorescence_view/src/testing.rs at line 19
pub const WINDOW_SIZE: iced::Size = iced::Size {width: 1024.0,height: 768.0,}; - replacement in inflorescence_view/src/testing.rs at line 76
Size::Fullscreen => iced::Size::new(512., 384.),Size::Fullscreen => WINDOW_SIZE, - edit in inflorescence_view/src/app.rs at line 15
use std::cmp; - edit in inflorescence_view/src/app.rs at line 21
/// Default min. width of a main view columnconst DEFAULT_MIN_COL_WIDTH: usize = 512; - edit in inflorescence_view/src/app.rs at line 26
pub window_size: iced::Size, - replacement in inflorescence_view/src/app.rs at line 243
el(scrollable(column(files))),el(scrollable(column(files).width(Length::Fill))), - edit in inflorescence_view/src/app.rs at line 245
.width(Length::Fill).height(Length::Fill) - replacement in inflorescence_view/src/app.rs at line 252
let left_view = match state.cursor.selection.as_ref() {// The number of visible columns depends on the screen width. Any cols on// left that don't fit will be hiddenlet max_visible_cols = cmp::max(2,state.window_size.width.floor() as usize / DEFAULT_MIN_COL_WIDTH,);let depth = if let Some(RecordMsg::Typing(_)) = state.record_msg.as_ref() {1} else if let Some(selection) = state.cursor.selection.as_ref() {match selection {cursor::Selection::UntrackedFile { .. }| cursor::Selection::ChangedFile { .. }| cursor::Selection::LogChange { file: None, .. } => 1,cursor::Selection::LogChange { file: Some(_), .. } => 2,}} else {0};let hidden_cols = (depth + 1_usize).saturating_sub(max_visible_cols);// dbg!(// state.window_size.width,// max_visible_cols,// depth,// hidden_cols// );let col_0 = el(column([repo_info,el(column([el(text("Untracked files:")), untracked_files()])),el(column([el(text("Changed files:")), changed_files()])),el(column([el(text("Recent changes:")), log()])),]).width(Length::Fill).height(Length::Fill));let col_1 = el(column([el(column([record_msg_editor, selection_details]).width(Length::Fill).height(Length::Fill)),if hidden_cols == 1 {el(button(row([el(text("← ").font(Font::MONOSPACE)),el(text("Status")),])).on_press(Msg::Cursor(cursor::Msg::Left)))} else {el(row([]))},]).width(Length::Fill).height(Length::Fill));let col_2 = match state.cursor.selection.as_ref() { - replacement in inflorescence_view/src/app.rs at line 313
}) => el(column([view_diff_header(format!("{path} changes in {}:",display_short_hash(hash))),match diffs {Some(diffs) => {let (file, state) = diffs.get(path).unwrap();diff::view(Some(state), file).map(|action| {Msg::LogChangeFileDiffAction {hash: *hash,file: path.clone(),action,}})}None => el(text("Loading diff..")),},]).width(Length::FillPortion(1)).spacing(SPACING)),Some(cursor::Selection::UntrackedFile { .. })| Some(cursor::Selection::ChangedFile { .. })| Some(cursor::Selection::LogChange { .. })| None => el(column([}) => Some(el(column([ - replacement in inflorescence_view/src/app.rs at line 315
repo_info,el(column([el(text("Untracked files:")), untracked_files()])),el(column([el(text("Changed files:")), changed_files()])),el(column([el(text("Recent changes:")), log()])),view_diff_header(format!("{path} changes in {}:",display_short_hash(hash))),match diffs {Some(diffs) => {let (file, state) = diffs.get(path).unwrap();diff::view(Some(state), file).map(|action| {Msg::LogChangeFileDiffAction {hash: *hash,file: path.clone(),action,}})}None => el(text("Loading diff..")),}, - replacement in inflorescence_view/src/app.rs at line 334
.height(Length::Fill)),el(button(row([el(text("←").font(Font::MONOSPACE)),el(text(" Nav back placeholder")),])).on_press(Msg::SaveRecord)),.height(Length::Fill).spacing(SPACING)),// NOTE: This is currently never true - there are only up to 3 colsif hidden_cols == 2 {el(button(row([el(text("← ").font(Font::MONOSPACE)),el(text("Log")),])).on_press(Msg::Cursor(cursor::Msg::Left)))} else {el(row([]))}, - replacement in inflorescence_view/src/app.rs at line 349
.spacing(SPACING)),};.spacing(SPACING))), - replacement in inflorescence_view/src/app.rs at line 351
let right_view =el(column([record_msg_editor, selection_details]).width(Length::Fill));Some(cursor::Selection::UntrackedFile { .. })| Some(cursor::Selection::ChangedFile { .. })| Some(cursor::Selection::LogChange { .. })| None => None,}; - replacement in inflorescence_view/src/app.rs at line 357
el(row([left_view, right_view]).spacing(SPACING))if let Some(col_2) = col_2 {let cols = [col_0, col_1, col_2].into_iter().skip(hidden_cols);el(row(cols).spacing(SPACING))} else {let cols = [col_0, col_1];el(row(cols).spacing(SPACING))} - edit in inflorescence_view/src/app/test.rs at line 13
const WINDOW_SIZE: iced::Size = iced::Size {width: 1024.0,height: 768.0,}; - edit in inflorescence_view/src/app/test.rs at line 38
window_size: WINDOW_SIZE, - edit in inflorescence_view/src/app/test.rs at line 64
window_size: WINDOW_SIZE, - edit in inflorescence_view/src/app/test.rs at line 103
window_size: WINDOW_SIZE, - edit in inflorescence_view/src/app/test.rs at line 122
window_size: WINDOW_SIZE, - edit in inflorescence_view/src/app/test.rs at line 151
window_size: WINDOW_SIZE, - replacement in inflorescence/src/test.rs at line 35
// - Msg::WindowOpened// - Msg::NoOp from opening a window - replacement in inflorescence/src/test.rs at line 47
if !window_opened && matches!(msg, Msg::WindowOpened(_)) {if !window_opened && matches!(msg, Msg::NoOp) { - replacement in inflorescence/src/test.rs at line 263
app::RecordMsg::Typing(msg) if &msg.text() == record_msgapp::RecordMsg::Typing(msg) if msg.text() == record_msg - replacement in inflorescence/src/main.rs at line 68[19.4278]→[11.163:203](∅→∅),[12.25551]→[11.163:203](∅→∅),[4.1124]→[11.163:203](∅→∅),[11.203]→[18.5498:5554](∅→∅)
let (window_id, open_window_task) =task::open_window(window::Settings::default());let window_settings = window::Settings::default();let window_size = window_settings.size;let (window_id, open_window_task) = task::open_window(window_settings); - replacement in inflorescence/src/main.rs at line 87
open_window_task.map(Msg::WindowOpened),open_window_task.map(|_id| Msg::NoOp), - edit in inflorescence/src/main.rs at line 97
window_size, - edit in inflorescence/src/main.rs at line 114
window_size: iced::Size, - replacement in inflorescence/src/main.rs at line 128
WindowOpened(window::Id),NoOp,Window(window::Event), - edit in inflorescence/src/main.rs at line 141
Msg::NoOp => Task::none(), - replacement in inflorescence/src/main.rs at line 143
Msg::WindowOpened(_id) => Task::none(),Msg::Window(event) => update_from_window_event(state, event), - edit in inflorescence/src/main.rs at line 173
fn update_from_window_event(state: &mut State,event: window::Event,) -> Task<Msg> {match event {window::Event::Opened { position: _, size }| window::Event::Resized(size) => {state.window_size = size;}window::Event::Closed| window::Event::Moved(_)| window::Event::RedrawRequested(_)| window::Event::CloseRequested| window::Event::Focused| window::Event::Unfocused| window::Event::FileHovered(_)| window::Event::FileDropped(_)| window::Event::FilesHoveredLeft => {}}Task::none()} - replacement in inflorescence/src/main.rs at line 673
on_key_press(|key, mods| {let key_subs = on_key_press(|key, mods| { - replacement in inflorescence/src/main.rs at line 719
})});let window_subs = window::events().map(|(_id, event)| Msg::Window(event));Subscription::batch([key_subs, window_subs]) - edit in inflorescence/src/main.rs at line 729
window_size, - edit in inflorescence/src/main.rs at line 741
window_size: *window_size,