mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-04 13:02:59 -05:00
Merge branch 'main' into fix/import-reports-skipped-4319
# Conflicts: # docs/whats-new.md
This commit is contained in:
commit
abcedc9948
7 files changed
+99
-1
No files matched your search
@@ -537,6 +537,18 @@ fn fire_alias(app: &mut LightcraftApp, ctx: &egui::Context, id: &str, params: se
|
||||
}
|
||||
return;
|
||||
}
|
||||
// in the library grid, Space opens the active photo in Detail, as in Lightroom Classic (issue
|
||||
// #4417); there it toggles the zoom again. Z, Toggle Zoom's own key, keeps toggling.
|
||||
if id == "view.zoomToggle" && library_grid(app) && !app.ui.fullscreen && app.session.active().is_some() {
|
||||
// fitted to the window, whatever the zoom was left at (it is shared with Detail)
|
||||
app.ui.zoom = crate::state::Zoom::Fit;
|
||||
fire_command(app, ctx, "view.detail", false);
|
||||
return;
|
||||
}
|
||||
// with no photo to open, Space does nothing in the grid: the zoom (shared with Detail) stays as it is
|
||||
if id == "view.zoomToggle" && library_grid(app) && !app.ui.fullscreen {
|
||||
return;
|
||||
}
|
||||
// over a tool on the photo, held Space is the view's hand; a tap toggles on its release
|
||||
if id == "view.zoomToggle" && crate::space_hand::begin(app, ctx) {
|
||||
return;
|
||||
|
||||
@@ -700,3 +700,53 @@ mod issue1771 {
|
||||
assert_eq!(h.app.session.selection.ids.len(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
/// Space in the library grid opens the active photo in Detail, as in Lightroom Classic (issue #4417).
|
||||
mod issue4417 {
|
||||
use super::*;
|
||||
use crate::state::{ViewMode, Zoom};
|
||||
use lightcraft_catalog::PhotoId;
|
||||
|
||||
fn grid(view: ViewMode) -> crate::headless::Headless {
|
||||
let mut h = library();
|
||||
h.app.ui.view = view;
|
||||
h.app.session.execute("library.select", &json!({"ids": [1, 2, 3], "active": 2})).unwrap();
|
||||
for _ in 0..3 {
|
||||
h.step();
|
||||
}
|
||||
h
|
||||
}
|
||||
|
||||
/// Given a grid with a multi-selection and the zoom left at 200 %, when Space is pressed, then the active photo
|
||||
/// opens in Detail at Fit with the selection kept; a second Space there toggles the zoom, as before, and stays in
|
||||
/// Detail.
|
||||
#[test]
|
||||
fn space_in_the_grid_opens_the_active_photo_then_toggles_the_zoom() {
|
||||
for view in [ViewMode::PhotoGrid, ViewMode::SquareGrid] {
|
||||
let mut h = grid(view);
|
||||
// left zoomed in from an earlier visit to Detail
|
||||
h.app.ui.zoom = Zoom::Percent(200.0);
|
||||
key(&mut h, "Space", false);
|
||||
assert_eq!(h.app.ui.view, ViewMode::Detail, "Space from {view:?}");
|
||||
assert_eq!(h.app.session.active(), Some(PhotoId(2)));
|
||||
assert_eq!(h.app.session.selection.ids, vec![PhotoId(1), PhotoId(2), PhotoId(3)]);
|
||||
assert_eq!(h.app.ui.zoom, Zoom::Fit, "opens fitted to the window");
|
||||
key(&mut h, "Space", false);
|
||||
assert_eq!(h.app.ui.view, ViewMode::Detail, "second Space stays in Detail");
|
||||
assert_ne!(h.app.ui.zoom, Zoom::Fit, "and toggles the zoom");
|
||||
}
|
||||
}
|
||||
|
||||
/// Given a grid with nothing selected, when Space is pressed, then the grid stays and the zoom is unchanged.
|
||||
#[test]
|
||||
fn space_in_the_grid_without_a_photo_does_nothing() {
|
||||
for view in [ViewMode::PhotoGrid, ViewMode::SquareGrid] {
|
||||
let mut h = grid(view);
|
||||
h.app.session.selection = Default::default();
|
||||
let zoom = h.app.ui.zoom;
|
||||
key(&mut h, "Space", false);
|
||||
assert_eq!(h.app.ui.view, view);
|
||||
assert_eq!(h.app.ui.zoom, zoom, "the zoom a photo opens at later is left alone");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -637,7 +637,7 @@ From `06-shortcuts.md` part 1. Evidence is our binding; conflicts are explained
|
||||
| KEY-WB | White-balance selector — W | P0 | ✅ | `cmd:tool.wbPicker` | |
|
||||
| KEY-FILMSTRIP | Filmstrip — / | P0 | ✅ | `cmd:view.filmstrip` | |
|
||||
| KEY-SHOWORIGINAL | Show original — \ | P0 | ✅ | `cmd:view.showOriginal` | |
|
||||
| KEY-TOGGLEZOOM | Toggle zoom — Space | P0 | ✅ | `cmd:view.zoomToggle`, `crates/ui-egui/src/space_hand.rs`, `crates/ui-egui/src/tests/space_hand.rs` | Space is a secondary binding (primary Z); held, it toggles once (the key's auto-repeat no longer flips the zoom back and forth). With a tool on the photo (Crop, Masking, Remove, Red Eye, the white-balance / colour-range / point-colour pickers, a targeted adjustment) held Space is the view's hand until the key is up, as in Lightroom: a click zooms to the click-zoom ratio at the point clicked (or back to Fit), a drag pans the zoomed photo (grab cursor; zoom-in cursor at Fit), and the tool gets neither; a tap (under 0.4 s, no click) toggles the zoom on its release (issue #1895) |
|
||||
| KEY-TOGGLEZOOM | Toggle zoom — Space | P0 | ✅ | `cmd:view.zoomToggle`, `crates/ui-egui/src/space_hand.rs`, `crates/ui-egui/src/tests/space_hand.rs` | Space is a secondary binding (primary Z); held, it toggles once (the key's auto-repeat no longer flips the zoom back and forth). With a tool on the photo (Crop, Masking, Remove, Red Eye, the white-balance / colour-range / point-colour pickers, a targeted adjustment) held Space is the view's hand until the key is up, as in Lightroom: a click zooms to the click-zoom ratio at the point clicked (or back to Fit), a drag pans the zoomed photo (grab cursor; zoom-in cursor at Fit), and the tool gets neither; a tap (under 0.4 s, no click) toggles the zoom on its release (issue #1895). In the library grid Space opens the active photo in Detail, fitted to the window, as Lightroom's Space opens the Loupe (issue #4417); Z there still toggles |
|
||||
| KEY-MASKCOLOR | Cycle mask colour — ⇧O | P1 | ✅ | `cmd:view.maskOverlayColor`, `crates/ui-egui/src/shortcuts.rs` | ⇧O while masking cycles the overlay colour (while cropping: the guides' orientation); the overlay mode is in View ▸ Mask Overlay ▸ Cycle Mask Overlay Mode |
|
||||
| KEY-EXPORTPREV | Export with previous — ⌘E | P0 | ✅ | `cmd:app.exportPrevious` | ⌘E (alias) and ⌥⇧⌘E (Classic) |
|
||||
| KEY-EXPORTDIALOG | Export dialog — ⇧E | P0 | ✅ | `cmd:dialog.export` | secondary binding (primary ⌘⇧E) |
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
- `library.import` now reports what its folder walk left out, `skipped: {unreadable, unsupported}`, as
|
||||
`library.importPreview` already did, so a script or MCP client can tell a skipped file from a missing one (#4319).
|
||||
|
||||
### Space opens a photo from the grid
|
||||
- In the Grid and the Square Grid, Space opens the active photo in Detail, fitted to the window, as in Lightroom
|
||||
Classic (issue #4417). There, Space toggles the zoom as before.
|
||||
|
||||
### Face suggestions match the same person more often
|
||||
- Each face is now read both as it is and mirrored, and the two are averaged before it is compared with the faces you
|
||||
have named. On the LFW benchmark with AuraFace, about 1 in 6 of a person's photos that used to miss the match bar now
|
||||
@@ -208,6 +212,15 @@
|
||||
Photo Grid. Populated-library launches without image arguments keep their saved view. (#3028)
|
||||
## 2026-10-30
|
||||
|
||||
### The pointer stays visible in the Flatpak on GNOME Wayland when its cursor theme loads by name
|
||||
- In the Flatpak on a Wayland desktop without the cursor-shape protocol (GNOME 46, for one), the mouse pointer could
|
||||
vanish for good after Crop & Rotate or a brush hid it: the sandbox couldn't see any cursor theme. The Flatpak now
|
||||
points at the host's cursor themes, as VectorCraft's does (issue #1657). Where the host's default theme is a
|
||||
symlink the sandbox can't follow (Ubuntu's `/etc/alternatives`), name a theme once:
|
||||
`flatpak override --user --env=XCURSOR_THEME=Adwaita ai.storyteller.lightcraft`, with in place of `Adwaita` any
|
||||
cursor theme installed in `/usr/share/icons` or `~/.local/share/icons` (a theme in `~/.icons` also needs
|
||||
`flatpak override --user --filesystem=~/.icons:ro ai.storyteller.lightcraft`).
|
||||
|
||||
### ↑ and ↓ keep the Survey together
|
||||
- In Survey (N) and Compare (C), ↑ and ↓ now step through the photos on screen, as → and ← do. Before, they ran the
|
||||
grid's Photo Below and Photo Above, which selected a single photo, so the survey shrank to that one photo
|
||||
|
||||
@@ -19,6 +19,9 @@ for name in ("ai.storyteller.lightcraft.yml", "ai.storyteller.lightcraft.bundle.
|
||||
assert manifest["id"] == "ai.storyteller.lightcraft" and manifest["command"] == "lightcraft", name
|
||||
# Without this talk-name the sandbox hides the accessibility bus and Orca cannot see the app.
|
||||
assert "--talk-name=org.a11y.Bus" in manifest["finish-args"], f"{name} lost --talk-name=org.a11y.Bus"
|
||||
# Without the host's cursor themes the pointer vanishes on Wayland once a tool hides it (#1657).
|
||||
xcursor = [a for a in manifest["finish-args"] if a.startswith("--env=XCURSOR_PATH=")]
|
||||
assert xcursor == ["--env=XCURSOR_PATH=~/.icons:/run/host/user-share/icons:/run/host/share/icons:/app/share/icons:/usr/share/icons:/usr/share/runtime/share/icons:~/.cursors"], f"{name}: XCURSOR_PATH is {xcursor}"
|
||||
manifests.append(manifest)
|
||||
for key in ("runtime", "runtime-version", "sdk", "finish-args"):
|
||||
assert manifests[0][key] == manifests[1][key], f"Flatpak manifests disagree on {key}"
|
||||
|
||||
@@ -23,6 +23,16 @@ finish-args:
|
||||
# Display: Wayland first; X11 only when no Wayland compositor is running.
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
# Cursor theme: without the cursor-shape protocol (GNOME 46, for one) winit loads the pointer
|
||||
# from an Xcursor theme itself. The sandbox sets no XCURSOR_PATH and the runtime ships no cursor
|
||||
# themes, so once a tool hides the pointer (Crop, brushes) it never comes back. The host's themes
|
||||
# are mounted under /run/host (#1657; the same fix as storytold/vectorcraft#2502).
|
||||
# A host whose default theme is a symlink out of /usr/share/icons (Ubuntu's /etc/alternatives)
|
||||
# still needs a theme named: flatpak override --user --env=XCURSOR_THEME=Adwaita ai.storyteller.lightcraft
|
||||
# ~/.icons stays first, as in the default search path: a theme there is found once that folder is
|
||||
# granted (flatpak override --user --filesystem=~/.icons:ro ai.storyteller.lightcraft). The
|
||||
# sandbox's own folders (the app's, the runtime's, an Icontheme extension's) stay searched last.
|
||||
- --env=XCURSOR_PATH=~/.icons:/run/host/user-share/icons:/run/host/share/icons:/app/share/icons:/usr/share/icons:/usr/share/runtime/share/icons:~/.cursors
|
||||
# X11 shared memory (MIT-SHM). Without it the X11 fallback is slow or fails.
|
||||
- --share=ipc
|
||||
# GPU access for the wgpu renderer (Vulkan, or GL as a fallback).
|
||||
|
||||
@@ -29,6 +29,16 @@ finish-args:
|
||||
# Display: Wayland first; X11 only when no Wayland compositor is running.
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
# Cursor theme: without the cursor-shape protocol (GNOME 46, for one) winit loads the pointer
|
||||
# from an Xcursor theme itself. The sandbox sets no XCURSOR_PATH and the runtime ships no cursor
|
||||
# themes, so once a tool hides the pointer (Crop, brushes) it never comes back. The host's themes
|
||||
# are mounted under /run/host (#1657; the same fix as storytold/vectorcraft#2502).
|
||||
# A host whose default theme is a symlink out of /usr/share/icons (Ubuntu's /etc/alternatives)
|
||||
# still needs a theme named: flatpak override --user --env=XCURSOR_THEME=Adwaita ai.storyteller.lightcraft
|
||||
# ~/.icons stays first, as in the default search path: a theme there is found once that folder is
|
||||
# granted (flatpak override --user --filesystem=~/.icons:ro ai.storyteller.lightcraft). The
|
||||
# sandbox's own folders (the app's, the runtime's, an Icontheme extension's) stay searched last.
|
||||
- --env=XCURSOR_PATH=~/.icons:/run/host/user-share/icons:/run/host/share/icons:/app/share/icons:/usr/share/icons:/usr/share/runtime/share/icons:~/.cursors
|
||||
# X11 shared memory (MIT-SHM). Without it the X11 fallback is slow or fails.
|
||||
- --share=ipc
|
||||
# GPU access for the wgpu renderer (Vulkan, or GL as a fallback).
|
||||
|
||||
Reference in new issue
Block a user