Skip to content

Added new multicapture camera UI#893

Open
VegardHV wants to merge 3 commits into
mainfrom
issue/vhv-1454-camera-ui-improvements
Open

Added new multicapture camera UI#893
VegardHV wants to merge 3 commits into
mainfrom
issue/vhv-1454-camera-ui-improvements

Conversation

@VegardHV

@VegardHV VegardHV commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description of Change

  • [ImageCapture] When taking several photos in a row, the most recent photo now shows as a thumbnail in the bottom-left corner of the camera and updates with each capture. The thumbnail can be tapped to review and/or remove photos from the capture session.
  • [ImageCapture] Added MaxImageCount with a default of 15 when using MultiImageCapture to avoid crash as images are stored in-memory only.
  • [Gallery] Fixed issue where gallery always reset to the first image when the collection changed.

Todos

  • I have tested on an Android device.
  • I have tested on an iOS device.
  • I have supported accessibility

Copilot AI review requested due to automatic review settings June 9, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the ImageCapture multi-capture experience by adding an in-camera “latest capture” thumbnail (tap-to-open gallery) with support for reviewing/removing captured images during the session, and introduces guardrails to bound in-memory image accumulation. It also fixes Gallery behavior where the visible image could jump back to the first item when the underlying collection changes.

Changes:

  • Add multi-capture in-camera thumbnail + overlay gallery (review/remove), plus MaxImageCount (default 15) and OnImageRemoved callback support.
  • Refactor streaming-state bottom toolbar to support configurable leading/trailing controls (flash/finish) and shared “rotate with device orientation” behavior; add native thumbnail blurring while a capture is in flight.
  • Update Gallery carousel behavior to keep scroll offset when items change and reduce initial “index 0” flash.

Reviewed changes

Copilot reviewed 29 out of 32 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
CHANGELOG.md Adds a 60.3.0 entry describing the new multi-capture UI, MaxImageCount, and the gallery fix.
src/app/Components/ComponentsSamples/ImageCapturing/MultiImageCaptureModalPage.xaml.cs Updates sample to use MaxImageCount/OnImageRemoved and avoids starting capture multiple times.
src/library/DIPS.Mobile.UI/API/Camera/Gallery/BottomSheet/BottomToolbar/GalleryBottomSheetBottomToolbar.cs Whitespace cleanup.
src/library/DIPS.Mobile.UI/API/Camera/Gallery/BottomSheet/GalleryBottomSheet.cs Minor whitespace cleanup in handler change logic.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Android/ImageCapture.cs Uses “ignore remaining callbacks” pattern and routes failures through shared failure handling.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Android/ImageCaptureCallback.cs Adds JNI constructor and “ignore remaining callbacks” to avoid disposal-related crashes.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/ImageCapture.CapturedImagesGallery.cs Implements multi-capture captured-images gallery lifecycle, remove handling, and max-limit messaging.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/ImageCapture.ConfirmState.cs Ensures accepted images are added to multi-capture list before returning to streaming.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/ImageCapture.StreamingState.cs Enforces image limit before capturing; wires new streaming toolbar controls.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/ImageCapture.cs Adds session reentrancy guard (m_isCapturing), optimistic gallery updates, unified stop logic, and failure rollback.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/OnCapturedImageRemoved.cs Adds new public delegate for “image removed” callback.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Settings/CameraOptions.cs Adds MaxImageCount (default 15) and OnImageRemoved to MultiImageCaptureOptions.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/ImageCaptureBottomToolbarView.cs Extends streaming-state API to accept leading/trailing controls.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/Android/CapturedImagesGalleryButton.cs Android native thumbnail blur animation support.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/CapturedImagesGalleryButton.cs New multi-capture thumbnail control (tap-to-open gallery) with count badge and blur hooks.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/FlashButton.cs Extracts flash toggle into a reusable button control.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/StreamingStateView.cs Refactors streaming view to render configurable leading/trailing controls (flash/finish).
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/StreamingTrailingControl.cs Introduces trailing-control model (flash vs finish capture).
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/dotnet/CapturedImagesGalleryButton.cs Adds net10.0 stub for partial thumbnail blur behavior.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/iOS/CapturedImagesGalleryButton.cs iOS native thumbnail blur overlay implementation.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/BottomToolbar/StreamingState/iOS/CoreImageFilterExtensions.cs Adds CoreImage filter helpers for edge clamp + gaussian blur.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/CameraZoom/ZoomButtons.cs Switches zoom button rotation handling to shared rotate-on-orientation extension.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/CameraZoom/ZoomSlider.cs Switches zoom label rotation handling to shared rotate-on-orientation extension.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/CapturedImagesGalleryOverlay.cs New full-screen overlay hosting Gallery + remove/done controls + empty state.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/RotateWithDeviceOrientation.cs Adds shared extension to rotate views with DUI.OrientationChanged and auto-unsubscribe.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/Views/TopToolbar/ImageCaptureTopToolbarView.cs Removes top-toolbar finish button and adjusts streaming-state controls for multi-capture.
src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/iOS/ImageCapture.cs Avoids disposing delegates mid-callback; adds safer settings creation and consistent failure routing.
src/library/DIPS.Mobile.UI/API/Camera/Preview/CameraPreview.cs Adds ShowPreview() counterpart to HidePreview().
src/library/DIPS.Mobile.UI/Components/Gallery/Gallery.cs Prevents carousel from resetting to first item on collection updates; adds initial-load hide/fade behavior.
src/library/DIPS.Mobile.UI/Resources/LocalizedStrings/LocalizedStrings/DUILocalizedStrings.Designer.cs Regenerates strongly-typed accessors for new localized strings.
src/library/DIPS.Mobile.UI/Resources/LocalizedStrings/LocalizedStrings/DUILocalizedStrings.en.resx Adds English strings for OK/max-images/empty-state/accessibility label.
src/library/DIPS.Mobile.UI/Resources/LocalizedStrings/LocalizedStrings/DUILocalizedStrings.resx Adds Norwegian strings for OK/max-images/empty-state/accessibility label.
Files not reviewed (1)
  • src/library/DIPS.Mobile.UI/Resources/LocalizedStrings/LocalizedStrings/DUILocalizedStrings.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

src/library/DIPS.Mobile.UI/API/Camera/ImageCapturing/ImageCapture.cs:90

  • m_isCapturing is set to true before several awaited calls (HasLoaded, PlatformStart, GoToStreamingState). If any of these throw, m_isCapturing is never reset, and future starts will always throw InvalidOperationException even though no session is running.
        if (await CameraPermissions.CanUseCamera())
        {
            m_isCapturing = true;
            Log("Permitted to use camera");
            await m_cameraPreview.HasLoaded();
            ConstructCrossPlatformViews();
            await PlatformStart(m_cameraSession.CameraOptions, m_cameraFailedDelegate);
            GoToStreamingState();
        }

VegardHV and others added 2 commits June 10, 2026 09:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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