Show only the photographs taken in the period you are looking at
🐳 Android image / Build and push (push) Successful in 1s
Build and test / android-image (push) Successful in 1s
Build and test / Desktop (Linux) (push) Failing after 57m33s
Build and test / Layer separation (push) Successful in 36s
Traceability / Requirement traces (push) Failing after 29s
Build and test / Android (aarch64) (push) Failing after 9m28s
🐳 Android image / Build and push (push) Successful in 1s
Build and test / android-image (push) Successful in 1s
Build and test / Desktop (Linux) (push) Failing after 57m33s
Build and test / Layer separation (push) Successful in 36s
Traceability / Requirement traces (push) Failing after 29s
Build and test / Android (aarch64) (push) Failing after 9m28s
The library could be narrowed by rating, flag and availability, but not by when a photograph was taken — so finding a fortnight meant scrolling to it and holding position. The range rides on `RatingFilter` for the reason `local_only` already does: every query path threads that one struct, so the count in the header cannot claim a total the grid does not draw. Undated images are excluded whenever either end is set — they cannot be inside or outside a span, and drawing them made the range look as though it had not applied. Taken from the timeline rather than typed into two date fields. Finding the period is what the histogram is for, and having found it the user should not have to read the dates off the axis and key them back in. The histogram keeps drawing the full extent while the range is on, or there would be nowhere to widen back out from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3645,6 +3645,50 @@ pub fn wire<F>(
|
||||
});
|
||||
}
|
||||
|
||||
// Narrow the grid to the period the histogram is showing.
|
||||
//
|
||||
// The range is taken from the timeline rather than typed into two date
|
||||
// fields: finding the fortnight is what the histogram is *for*, and having
|
||||
// found it the user should not have to read the dates off the axis and key
|
||||
// them back in. Zoom, then say "only that".
|
||||
//
|
||||
// Toggling off clears both ends rather than remembering them — a range you
|
||||
// cannot see the extent of is a filter that looks like an empty library.
|
||||
{
|
||||
let weak = window.as_weak();
|
||||
let ctl = ctl.clone();
|
||||
window.on_library_toggle_date_range(move || {
|
||||
let Some(w) = weak.upgrade() else { return };
|
||||
let on = !ctl.filter.borrow().has_date_range();
|
||||
if on {
|
||||
// The span the axis is currently drawn over, which is what the
|
||||
// user is looking at when they ask for "this range".
|
||||
let borrow = ctl.catalog.borrow();
|
||||
let Some(catalog) = borrow.as_ref() else {
|
||||
return;
|
||||
};
|
||||
let Some(span) = catalog_span(catalog, &ctl) else {
|
||||
return;
|
||||
};
|
||||
let (from, to) = zoomed_span(
|
||||
span,
|
||||
*ctl.timeline_zoom.borrow(),
|
||||
*ctl.timeline_centre.borrow(),
|
||||
);
|
||||
drop(borrow);
|
||||
let mut f = ctl.filter.borrow_mut();
|
||||
f.captured_from = Some(from);
|
||||
f.captured_to = Some(to);
|
||||
} else {
|
||||
let mut f = ctl.filter.borrow_mut();
|
||||
f.captured_from = None;
|
||||
f.captured_to = None;
|
||||
}
|
||||
w.set_library_range_active(on);
|
||||
refilter(&w, &ctl);
|
||||
});
|
||||
}
|
||||
|
||||
// TRACES: FR-CAT-9
|
||||
// "On this device" — the images openable without a server. Composes with
|
||||
// the rating terms rather than replacing them: "five-star frames I can
|
||||
|
||||
Reference in New Issue
Block a user