Skip to content

Fix/exif histogram overlap - #949

Closed
squareSphere29 wants to merge 3 commits into
storytold:mainfrom
squareSphere29:fix/exif-histogram-overlap
Closed

squareSphere29 wants to merge 3 commits into
storytold:mainfrom
squareSphere29:fix/exif-histogram-overlap

Conversation

@squareSphere29

Copy link
Copy Markdown
Contributor

Fixes #913 - EXIF values under histogram run together

The histogram's EXIF strip previously rendered 4 fixed-position items (ISO,
focal length, aperture, shutter). Missing values became empty strings via
unwrap_or_default() but still occupied their fixed positions, causing
"ISO 1000200mm" visual collisions when focal length or aperture were missing.

This fix:

  • Filters empty EXIF values (collects only non-empty fields)
  • Distributes items evenly using (i + 0.5) / count
  • Applies dynamic alignment: first=left, last=right, middle=center
  • Early exit if no EXIF data available

- Runs cargo xtask ci on ubuntu-22.04 for every push/PR to main
- Mirrors FreeBSD/release.yml patterns: pinned actions, craft-fonts, deps
- Hardened per adversarial review:
  - retry=3 on checkout (x2) and rust-toolchain
  - rust-cache key includes Cargo.lock hash (prevents cache poisoning)
  - actions/cache on apt packages (saves 2-3 min/run)
  - RUST_TEST_THREADS=4 (prevents frame-budget flakes)
  - CARGO_TARGET_DIR isolated per run
  - timeout-minutes: 45 (realistic, catches hangs)
- Partially addresses Gap storytold#9: "Tests don't run in CI on macOS, Windows or Linux x64"
  - Linux x64: ✅ done
  - macOS: ⬜ pending (follow-up PR)
  - Windows: ⬜ pending (follow-up PR)
- Remaining Gap storytold#9 effort: ~4-8 hrs for macOS + Windows job
- Filter empty EXIF values instead of rendering empty strings at fixed positions
- Distribute remaining items evenly across available width using (i + 0.5) / count
- Apply left/center/right alignment dynamically based on item position
- Fixes 'ISO 1000200mm' visual collision when focal length or aperture missing
- Filter empty EXIF values and join with ' · ' separator (matches grid.rs pattern)
- Single centered text element — no overlap possible
- Fixes 'ISO 1000200mm' visual collision when focal length or aperture missing
@ingolfteetz

Copy link
Copy Markdown
Contributor

Thanks for picking this up so quickly!

I had a fix on a local branch when I opened #913, so here's a comparison in case it helps:

My branch: ingolfteetz/lightcraft@89e4e6b0 (one commit, LR-VIEW-HISTOGRAM). It measures the labels and spreads them like Lightroom (spread_labels, a pure function). When they don't fit, it draws them smaller, down to 10.5 pt, then shortens the widest with "…", so they never overlap. It has headless tests at 250–520 pt that fail on the old layout, and updates the parity row.

Happy either way: take spread_labels and the tests into this PR (cherry-pick 89e4e6b), or I open mine and you review it. Whatever is easier for you and the maintainers.

Copy link
Copy Markdown
Member

The EXIF strip fix (your two edit.rs commits, #913) landed in #975, cherry-picked so the CI workflow commit stays with #941 (see my note there). Closing this one since its fix is in. Thank you, @squareSphere29!


Generated by Claude Code

@bflatastic bflatastic closed this Oct 11, 2026
@squareSphere29
squareSphere29 deleted the fix/exif-histogram-overlap branch October 11, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit panel: the EXIF values under the histogram run together ("ISO 1000200mm")

3 participants