Skip to content

Restore configured background and make progress UI configurable - #55

Merged
benedom merged 5 commits into
benedom:masterfrom
jacklieblich:fix/configurable-progress-delay
Aug 7, 2026
Merged

Restore configured background and make progress UI configurable#55
benedom merged 5 commits into
benedom:masterfrom
jacklieblich:fix/configurable-progress-delay

Conversation

@jacklieblich

@jacklieblich jacklieblich commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restore configuration.colors.background as the background of the main crop view
  • add showsProgressLayer so clients can disable the progress UI when they provide their own loading feedback
  • add progressLayerDelay so clients can avoid flashing the progress UI for crops that finish quickly
  • preserve existing behavior with a default delay of .zero
  • document the new setting and cover its custom/default values in configuration tests

Why

The real-toolbar refactor removed the crop view's configured background even though the public API and documentation still describe colors.background as the background of the entire cropping view. The crop content consequently becomes transparent, which can reduce contrast between the retained and discarded areas and make white toolbar controls difficult to see over a light presenting surface. The restored background is applied outside the iOS 26 scroll-edge wrapper so it also covers that wrapper's transparent toolbar spacer.

The progress layer is also currently inserted for every crop. In repeated or app-owned crop sessions, fast synchronous crops can render it for only a frame, which looks like a glitch. showsProgressLayer lets clients with their own loading state disable it, while progressLayerDelay lets other clients defer it; SwiftUI automatically cancels the delayed view task when cropping finishes before the threshold.

Compatibility

showsProgressLayer defaults to true and the delay defaults to .zero, so existing clients retain the current immediate progress-layer behavior.

Testing

  • swift test: 7 passed

@jacklieblich jacklieblich changed the title Restore configured background and support delayed progress UI Restore configured background and make progress UI configurable Aug 7, 2026
@benedom

benedom commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Hi @jacklieblich looks good!

I wired the background into the demo app and added you as a contributor to the README. It this looks good to you I will merge :)

@benedom
benedom merged commit adbf08d into benedom:master Aug 7, 2026
3 checks passed
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.

2 participants