Skip to content

Prevent CameraPreview toolbar clipping on compact screens - #920

Open
Vetle444 wants to merge 1 commit into
mainfrom
vefi/bugfix-2053
Open

Prevent CameraPreview toolbar clipping on compact screens#920
Vetle444 wants to merge 1 commit into
mainfrom
vefi/bugfix-2053

Conversation

@Vetle444

@Vetle444 Vetle444 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description of Change

Addresses Arena.Mobile #2053.

  • Allows custom CameraPreview bottom toolbar content to grow to its natural height while preserving the calculated letterbox height as its minimum.
  • Keeps zoom controls and bottom overlay offsets above the toolbar's actual rendered height.
  • Adds a compact-screen regression test based on the measured iPhone SE scanner layout.

Todos

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

Copilot AI lite review requested due to automatic review settings August 4, 2026 08:12
@Vetle444
Vetle444 enabled auto-merge (squash) August 4, 2026 08:14

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 fixes an iOS compact-screen layout issue in CameraPreview where custom bottom toolbar content could be clipped by allowing the bottom toolbar container to grow to its natural height while still reserving the computed letterbox height as a minimum. It also updates zoom/overlay offset calculations to respect the toolbar’s rendered height and adds a regression unit test for the measured iPhone SE layout case.

Changes:

  • Update CameraPreview to set a minimum bottom toolbar height (letterbox) instead of a fixed HeightRequest, allowing content-driven growth.
  • Ensure zoom control margin and overlay offset calculations use the effective bottom toolbar height.
  • Add a compact-screen regression unit test and document the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/library/DIPS.Mobile.UI/API/Camera/Preview/CameraPreview.cs Allows bottom toolbar to expand beyond the letterbox minimum and updates dependent offsets/margins accordingly.
src/tests/unittests/API/Camera/Preview/CameraPreviewTests.cs Adds a compact-screen regression test based on iPhone SE measurements.
CHANGELOG.md Adds a patch-note entry describing the CameraPreview clipping fix.

Comment thread src/tests/unittests/API/Camera/Preview/CameraPreviewTests.cs
Comment thread src/tests/unittests/API/Camera/Preview/CameraPreviewTests.cs
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