Repository navigation
Conversation
On the web, a commit's image opens with the commit docked under it, and a button undocks it to see the whole picture. The native viewer showed the image alone. The viewer now has a sheet-pane under the image with the commit's author and its whole body, which scrolls in the pane when it's long. It opens drawn up, as the web docks it, and a drag takes it down to the author line and back up, in place of the web's dock button. The drag runs on the phone; only the height it comes to rest at goes back to PHP, and the pane stays there from one image to the next. The commit is kept as it was when the viewer opened, as its images already are. Refs NativePHP#53. 🤖 Generated with Claude Code
The pane opened at a fixed 360pt, which left room under a short commit and hid the chevrons. It now uses sheet-pane's new `fit` detent, which sizes it to the commit, and drags down to the 88pt author line. The pane reports `fit` or a height when it comes to rest, and either is kept from one image to the next. With `fit` the pane keeps the commit pinned to its top when it's down, so it's cut off at the bottom instead of moving, which a bottom sheet with a `fit` detent didn't do. This needs NativePHP/mobile-ui's sheet-pane `fit` detent. Refs NativePHP#53. 🤖 Generated with Claude Code
jubianchi
force-pushed
the
feat/image-viewer-commit-panel
branch
from
October 31, 2026 12:15
db80d97 to
83e9928
Compare
Contributor
Author
|
The Three cases in I'm leaving |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the web, a commit's image opens with the commit docked under it, and a button in the lightbox's toolbar undocks it to see the whole picture. The native viewer from #70 showed the image alone. This is the part of #53 that #70 left out ("Commits / reply sheet available under image with option to undock").
Depends on NativePHP/mobile-ui#193, which adds the
fitdetent to<native:sheet-pane>used here. Once it's merged,composer.lockneeds updating to a mobile-ui that has it. Until then CI runs against mobile-uimain, wherefitdoesn't exist, so thetestscheck fails (see the comment below).How it works:
partials/image-viewer) has a<native:sheet-pane>over the bottom of the picture with the commit: a grabber, its author (avatar in their lane or live ring, name, handle and age) and its whole body.detents="88,fit": it opens atfit, exactly as tall as the commit, as the web docks it. A drag takes it down to the 88pt author line, to see more of the picture, and back up, in place of the web's dock button. Down, the commit stays pinned to the top and is cut off at the bottom.ShowsCommits::viewerPaneMoved(),fitor a height), so it stays where you left it from one image to the next.sheet-pane: it's drawn inside the viewer's modal instead of being presented over it, so the picture behind keeps its pinch and pan on both platforms. I tried<native:bottom-sheet permanent background-interaction>with itsfitdetent too: it works over the modal, but taken down to its small detent it re-centres the commit and loses its top padding, and on Android its scrim would block the picture's gestures.viewerCommit), as its images already are. The picture keeps the room the pane takes when it's down (Display::ViewerPaneRoom), so the chevrons stay above it. Drawn up, the pane overlaps the bottom of the chevrons, as the web's docked panel overlaps the picture.The web's zoom and download buttons aren't here: pinch already zooms, and #53 doesn't ask for downloads. Making the viewer edge to edge and swiping between images are left for a follow-up.
Tests: new cases in
ImageViewerTest(the pane and what it shows, on iOS and Android; the detent kept from one image to the next, down or atfit; the commit forgotten on close). The full suite passes with the mobile-ui branch from #193.Screenshots
iOS only: there's no Android emulator here. Taken on an iPhone 18 Pro simulator against a local devnull, with the mobile-ui branch from #193. The before shots are
main's viewer on the same image.viewer: a commit with three images, the pane drawn up to the commit's height.
The pane dragged down to the author line and back up:
Full-quality recordings: iOS light, iOS dark
🤖 Generated with Claude Code