Skip to content

Fix mobile scanner upload flow and fit it to one screen - #7684

Open
Frooodle wants to merge 3 commits into
mainfrom
fix/mobile-scanner-upload-flow
Open

Fix mobile scanner upload flow and fit it to one screen#7684
Frooodle wants to merge 3 commits into
mainfrom
fix/mobile-scanner-upload-flow

Conversation

@Frooodle

Copy link
Copy Markdown
Member

file mobile phone scanner UI issues when on http and scaling UI issues


Checklist

General

Documentation

Translations (if applicable)

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have run task check to verify linters, typechecks, and tests pass
  • I have tested my changes locally. Refer to the Testing Guide for more details.

The phone page had four problems after picking a file:

- A successful upload called window.close(), and when the browser
  blocked it (always, for a tab opened from a QR code) fell back to
  navigating to the editor root, which is auth-gated - so the phone
  landed on the login page. It now stays on the success screen and
  offers "Scan another". handleHttpError also bounced any 401 to
  /login without exempting /mobile-scanner and /mobile-sign.
- The preview pane was a fixed calc(100dvh - 60px) block stacked after
  the header and the camera warning, pushing its controls bar - and the
  batch strip below it - off the bottom of the screen, so there was no
  visible upload button. The page is now one 100dvh flex column with
  the primary action pinned to the bottom on every screen.
- The HTTPS/camera warning was permanent and full-size. It is now a
  compact dismissible alert, hidden while a preview is waiting.
- Nothing scrolls at any size: every level clips, sizes are clamp()ed
  against dvh, the choice cards share the leftover height (side by side
  and chrome-free under 34rem tall), and the thumbnail strip shrinks
  tiles and collapses extras into a "+N" tile.

Also fixes three bugs in the same flow: the multiple file input only
kept files[0]; the pending preview uploaded ahead of the batch, so page
2 arrived before page 1; and the input was never reset, so re-picking
the same file did nothing. The camera status banner printed developer
strings ("Waiting for video... (12/50)", "jscanify init failed") to
users - that detail now goes to the console and the banner is a plain
"Starting camera...".
@Frooodle
Frooodle requested review from a team and balazs-szucs as code owners August 26, 2026 15:09
Picking several images left two overlapping ideas of "the images": a
single pending preview plus a separate batch. That produced a strip
labelled "Batch (3)" next to an "Upload (4)" button, a "Clear" that
wiped everything sitting beside a "Remove" that dropped only the
previewed one, and - worst - thumbnails that could not be tapped, so
once an image was removed the rest could not be viewed or removed at
all.

There is now one list of images and an index into it:

- Every thumbnail is a button. Tapping one opens it, ringed in the
  accent colour with the rest dimmed, and the strip header reads
  "Image 3 of 5" so position is never in doubt.
- Remove drops the open image and lands on a neighbour, so the rest
  stay reviewable. In camera mode it is labelled Retake and returns to
  the viewfinder, which is what retaking means.
- Add More returns to the viewfinder or reopens the picker; Back leaves
  the image in place and goes back to capturing.
- Clear All sits in the strip header, away from the per-image Remove.
- The strip wraps instead of scrolling, and the tile size is chosen
  from the viewport so every image stays reachable and on screen.

Verified across ten viewports from 240x320 to 1024x1366 with 1, 3, 9,
21 and 40 images: nothing renders off screen, nothing scrolls, no
thumbnail is clipped out of reach and Upload stays in view.

Retires the batch-era keys (addToBatch, batchImages, clearBatch) and
renames selectImage to selectImages now the picker takes several.
@github-actions github-actions Bot added Front End Issues or pull requests related to front-end development Translation Issues or pull requests related to translation labels Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Frontend Check Failed

There are issues with your frontend code that will need to be fixed before they can be merged in.

Run task frontend:fix to auto-fix what can be fixed automatically, then run task frontend:check:all to see what still needs fixing manually.

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines ignoring generated files. Bugfix Pull requests that fix bugs labels Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Pull requests that fix bugs Front End Issues or pull requests related to front-end development size:XXL This PR changes 1000+ lines ignoring generated files. Translation Issues or pull requests related to translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant