iOS: add zoomCoverScale so the flying cover matches a zoomed card - #6
Merged
Conversation
Bookwise scales its book covers by 1.01 inside a clipping box, to hide a keyline along the image edge. The zoom flight did not know that. It rasterises the card into a flat stand-in, so the flight showed the cover at 1.0 while the card behind it sat at 1.01, and the cover changed size at the moment the flight handed over. zoomCoverScale is a per-screen scale applied to the rasterised contents about the canvas centre, inside zoomMakeStandInFromCardView. Non-positive means no zoom, so every existing screen is unchanged: RNSZoomCoverScale maps 0 to 1 and the scaling block is skipped entirely when the value is 1. Plumbed the same way as the other Readwise zoom props (zoomCloseOvershoot and its siblings): native prop on RNSScreen, Fabric spec entries for both the screen and modal-screen components, ScreenProps, the InnerScreen forwarder, and NativeStackNavigationOptions. iOS only. No behaviour change for any screen that does not set it. Co-Authored-By: Claude Opus 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.
Problem
Bookwise scales its book covers by 1.01 inside a clipping box, to hide a keyline along the image edge. The zoom flight does not know that.
zoomMakeStandInFromCardViewrasterises the card into a flat stand-in, so the flight shows the cover at 1.0 while the card behind it sits at 1.01. The cover visibly changes size at the moment the flight hands over to the real card.This is currently broken in production.
readwiseio/rekindledalready passeszoomCoverScalefromLoggedInRootContainer.tsx, but nothing downstream accepts it, so the value is dropped and the prop is a no-op.Fix
zoomCoverScaleis a per-screen scale applied to the rasterised contents about the canvas centre, insidezoomMakeStandInFromCardView.Non-positive means no zoom, so every existing screen is unchanged:
RNSZoomCoverScalemaps the 0 default to 1, and theCGContextScaleCTMblock is skipped entirely when the value is 1.Plumbed exactly like the other Readwise zoom props (
zoomCloseOvershootand its siblings): native prop onRNSScreen, Fabric spec entries for both the screen and modal-screen components,ScreenProps, theInnerScreenforwarder, andNativeStackNavigationOptions.iOS only. 45 lines added, none removed.
Base
Branched from
readwise, not from #5. The stand-in machinery it hooks into is already onreadwise, so this applies cleanly and can merge independently of the modal-zoom work.Consumer side
Landing this is necessary but not sufficient. The
#readwiseref has to be bumped, andpatches/@react-navigation__native-stack@7.12.0.patchin rekindled needszoomCoverScaleadded to its prop allow-list, or the navigator drops the prop before it reaches a screen. Being a native prop, it also needs a native build — it cannot ship over OTA.