Show and set colour labels in the grid and develop, and filter by them

Colour labels could be read from a Lightroom sidecar and queried by the
selector, but nothing drew one or set one, so the only labels a library
held were ones another program had written.

Every mark carries its label's initial on its colour — R, Y, G, B, P —
so a label is read without telling red from green, which is what
NFR-A11Y-3 asks of colour labels by name. A grid cell shows the mark
before its filename. In the grid, 6, 7, 8 and 9 set red, yellow, green and
blue as Lightroom's keys do, on the photograph under the pointer or on
the selection by the rule the star keys follow; the same key again takes
the label off, and over a mixed selection it sets it on all. The
selection bar gains Label, which opens the six choices — each a mark and
a name — and purple, which has no key, is there. In develop the top bar
says "Label: Green" beside the mark, opens the same choices, and 6-9
label the open photograph.

Each gesture is one catalog transaction, then the grid, the counts and
both sidecars are written as a rating's are. The filter bar gains a chip
per label, its mark and its name with a count, one at a time; the filter
is one SQL term, travels in the place record, and "All" clears it.
This commit is contained in:
2026-09-24 21:52:23 -04:00
parent d748527a4c
commit 46f5b95828
18 changed files with 860 additions and 86 deletions
+4
View File
@@ -33,6 +33,7 @@ impl From<&RatingFilter> for StoredFilter {
people: f.people.clone(),
people_all: matches!(f.people_mode, PeopleMode::All),
eyes_open: f.eyes_open,
label: f.label,
}
}
}
@@ -54,6 +55,7 @@ impl From<&StoredFilter> for RatingFilter {
PeopleMode::Any
},
eyes_open: s.eyes_open,
label: s.label,
}
}
}
@@ -189,6 +191,7 @@ mod tests {
people: vec![7, 9],
people_all: true,
eyes_open: true,
label: Some(dr_types::ColourLabel::Green),
},
}
}
@@ -312,6 +315,7 @@ mod tests {
people: vec![3, 5, 8],
people_mode: PeopleMode::All,
eyes_open: true,
label: Some(dr_types::ColourLabel::Purple),
};
let back: RatingFilter = (&StoredFilter::from(&original)).into();
assert_eq!(back, original);