Repository navigation
Document image fit names and how each fit draws - #576
Merged
Merged
Conversation
The image page said fit modes 0/1 and 2/3 each draw the same way, which was only ever true on iOS and stopped being true with mobile-ui#153. Describe the four fits as they draw now on both platforms, the names and ImageFit cases fit takes from 4.7 (mobile-air#572), and that an image with a width and no height sizes from its aspect ratio. The examples use the names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
October 23, 2026 12:28
Modal, bottom sheet, carousel, lazy grid and stack examples still passed :fit="1" and :fit="2". Switch them to fit="contain" and fit="cover" so every v4 page uses the names the image page documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The image page said fit modes 0 and 1 draw the same, and 2 and 3 draw the same. That was how iOS used to behave. NativePHP/mobile-ui#153 made both platforms follow CSS
object-fit, and NativePHP/mobile-air#572 letsfittake a name or anImageFitcase as well as the integer.This rewrites the
fitprop and thefit()method for that: the four fits as they draw now, contain as the default, and the note that an image with a width but no height takes its height from the image's aspect ratio. The examples usefit="cover"andfit="contain"instead of the integers, on this page and on the modal, bottom sheet, carousel, lazy grid and stack pages. Both entries get a "Changed 4.7" badge.Things to watch:
fit="cover"to 0, so the preview draws none instead of cover until Jump ships 4.7.🤖 Generated with Claude Code