about summary refs log tree commit diff
path: root/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
Commit message (Collapse)AuthorAgeFilesLines
* [Lightbox] Fix jump when zooming out on iOS (#6633)dan2024-11-221-2/+18
|
* Fix lightbox spinner (#6561)Paul Coroneos2024-11-221-3/+3
| | | | | | | | | | | | | * refactor imageitem useanimatedreaction logic * revert copy/paste fix * revert last commit * Fix conditions --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Use compiler-safe Reanimated get/set APIs (#6391)dan2024-11-171-4/+4
| | | | | | | | | | | | | | | | | | | | | * Convert lightbox to get/set * Work around software-mansion/react-native-reanimated#6613 * Use get/set in more places * Port MainScrollProvider to get/set * Port more to get/set * Port composer to get/set * Remove unnecessary thread hops in composer * Port more things to get/set * Convert more to get/set, remove redundant runOnJS * Convert remaining cases to get/set
* Fix render loop on Android (#6213)dan2024-11-101-4/+8
|
* [Lightbox] Always rely on Expo Image cache (#6189)dan2024-11-091-3/+10
| | | | | | | | | | | | | | | * Inline useImageAspectRatio * Switch AutoSizedImage to read dimensions from Expo Image cache * Include thumbnail dimensions in image data * Use dims from Expo Image cache in lightbox * Fix wiring so all thumbnails get dimensions * Fix type * Oops
* [Lightbox] Open animation (#6159)dan2024-11-091-38/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Measure all rects for embeds * Measure avi rects too * Animate lightbox in and out * Account for safe area in the animation * Tune spring times * Remove null checks for measurements * Remove superfluous view * Block swipe while opening * Interpolate width/height on native side for Android * Make it fast by animating only affine transforms * Fix tall image final state The initial animation frame is still off on both platforms. * Try to squeeze perf * Avoid blank images during animation on iOS * Fix bad rebase * Fix a huge memory issue due to expo/expo#24894 * Fix last frame flash * Fix thum dim calculation for tall images
* [Lightbox] Add border radius to avatars (#6136)dan2024-11-081-1/+4
| | | | | | | | | | | * Preserve shape in lightbox * Rename shapes to semantic meanings It looks like after all I do want to fork based on those. * Round avatars on the web * Oops
* [Lightbox] New dismiss gesture (#6135)dan2024-11-081-51/+44
| | | | | | | | | | | | | | | | | | | | | | | | | * Make iOS scrollview bounded to the image I've had to remove the dismiss handling because the scroll view no longer scrolls at rest. * Fix double-tap not working right after a vertical swipe It seems like for some reason the vertical swipe is still being handled by the scroll view, so double tap gets eaten while it's "coming back". But you don't really see it moving. Weird. * Add an intermediate LightboxImage component * Hoist useImageDimensions up * Implement xplat dismiss gesture This is now shared between platforms, letting us animate the backdrop and add a consistent "fly away" behavior. * Optimize Android compositing perf * Fix supertall images For example, https://bsky.app/profile/schlagteslinks.bsky.social/post/3l7y4l6yur72e * Fix oopsie
* [Lightbox] Set 2 as minimal allowed zoom level (#6132)dan2024-11-061-6/+9
| | | | | * [Lightbox] Set 2 as minimal allowed zoom level on iOS * Fix both Android and iOS
* Remove SCREEN from lightbox layout (#6124)dan2024-11-061-48/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Assign an ID to lightbox and use it as a key * Consolidate lightbox props into an object * Remove unused prop * Move SafeAreaView declaration * Keep SafeAreaView always mounted When exploring Android animation, I noticed its content jumps on the first frame. I think this should help prevent that. * Pass safe area down for measurement * Remove dependency on SCREEN in Android event handlers * Remove dependency on SCREEN in iOS event handlers * Remove dependency on SCREEN on iOS * Remove dependency on SCREEN on Android * Remove dependency on JS calc in controls * Use flex for iOS layout
* Unify dimensions cache between lightbox and feed (#6047)dan2024-11-041-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove useless memo * Use explicit values when useImageAspectRatio doesn't know It's not very good that you can't distingiush when we haven't loaded vs when we're certain. This shifts the burden of dealing with missing values to the caller. * Check cache early * Handle src change * Rewrite image-sizes.fetch to avoid mixing async styles * Make image-sizes LRU Code is copy paste from useImageDimensions.ts * Rm unused fields * Derive aspect on the fly * Factor useImageDimensions out of useImageAspectRatio * Move useImageDimensions into image-sizes * Make lightbox use the same cache * Wire up known dimensions to the lightbox * Handle division by zero in the hook * Use safe aspect for lightbox calculations
* Explicitly mark lightbox worklets (#6038)dan2024-10-311-0/+2
|
* Show almost-instant preview when opening lightbox (#6000)dan2024-10-291-22/+26
| | | | | | | | | | | * Plumb thumbUri down to the lightbox * Remove onLoad tracking from lightbox * Hook up placeholder URI to the image * Fix NaN causing crash on double tap while offline * Protect against NaNs in the future
* use `showControls` to show/hide live text icon on ios (#2982)Hailey2024-02-231-2/+9
|
* use ios live text interaction in alt text modal and image viewer (#2752)Hailey2024-02-061-0/+1
|
* Fix scroll on native (#2170)dan2023-12-111-2/+2
|
* Fix scroll on profile lists/feeds (#2168)dan2023-12-111-2/+2
|
* Remove deprecated models and mobx usage (react-query refactor) (#1934)Paul Frazee2023-11-161-1/+0
| | | | | | | | | | | | | | | | | | | | | * Update login page to use service query * Update modal to use session instead of store * Move image sizes cache off store * Update settings to no longer use store * Update link-meta fetch to use agent instead of rootstore * Remove deprecated resolveName() * Delete deprecated link-metas cache * Delete deprecated posts cache * Delete all remaining mobx models, including the root store * Strip out unused mobx observer wrappers
* Toggle lightbox controls on tap (#1687)dan2023-10-131-60/+57
| | | | | | | * Make the lightbox controls animation smoother * Toggle controls on tap * Disable pointer events when hidden
* Fix MobX crash for Android lightbox (#1668)dan2023-10-101-0/+1
| | | | | * Fix MobX crash for Android lightbox * Reorder props to match between forks
* Change lightbox to use Pager (#1666)dan2023-10-101-4/+2
| | | | | | | | | * Change lightbox to use Pager * Fix crash issue on ios --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Refactor iOS lightbox to Reanimated (#1645)dan2023-10-101-108/+55
| | | | | * Remove unnecessary transform logic * Switch iOS swipe-to-dimiss to Reanimated
* Rewrite Android lightbox (#1624)dan2023-10-051-5/+40
|
* Fix animations and gestures getting reset on state updates in the lightbox ↵dan2023-10-051-12/+27
| | | | | | | | | (#1618) * Fix translation resetting on state update * Copy getImageStyles into iOS and Android forks * Fix opacity resetting on state update
* Remove unused lightbox options (#1616)dan2023-10-051-38/+137
| | | | | | | | | | | | | | | | | | | | | | | * Inline lightbox helpers * Delete unused useImagePrefetch * Delete unused long press gesture * Always enable double tap * Always enable swipe to close * Remove unused onImageIndexChange * Inline custom Hooks into ImageViewing * Declare LightboxFooter outside Lightbox * Add more TODO comments * Inline useDoubleTapToZoom * Remove dead utils, move utils used only once
* Make "double tap to zoom" precise across platforms (#1482)dan2023-09-191-3/+9
| | | | | * Implement double tap for Android * Match the new behavior on iOS
* fix prefetching lightbox images (#1163)Eric Bailey2023-08-151-1/+4
| | | | | | | | | * fix prefetching lightbox images * use array signature * fix other RN native image usage * delay prefetching to allow UI to re-render
* [APP-724] Collection of accessibility fixes (#949)Paul Frazee2023-07-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix: include alt text on the web lightbox image * a11y: Dont read the 'ALT' label * a11y: remove a wrapper behavior from posts This appears to have been introduced with the goal of creating meta actions on posts, but the behavior seems counter-productive. The accessibility inspector was unable to access individual items within the post and therefore most content was simply skipped. There may be a way to support the post actions without losing the ability to access the inner elements but I couldnt find it. -prf * a11y: apply alt tags to image wrappers so they get read * a11y: set Link accessibilityLabel to the title if none set * a11y: skip the SANDBOX watermark * a11y: improve post meta to not read UI and give a useful date * ally: improve post controls * a11y: add labels to lightbox images on mobile * fix types
* React Native accessibility (#539)Ollie H2023-05-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * React Native accessibility * First round of changes * Latest update * Checkpoint * Wrap up * Lint * Remove unhelpful image hints * Fix navigation * Fix rebase and lint * Mitigate an known issue with the password entry in login * Fix composer dismiss * Remove focus on input elements for web * Remove i and npm * pls work * Remove stray declaration * Regenerate yarn.lock --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Saves image on long press (#83)Aryan Goharzad2023-01-251-0/+152
* Saves image on long press * Adds save on long press * Forking lightbox * move to wrapper only to the bottom sheet to reduce impact of this change * lint * lint * lint * Use official `share` API * Clean up cache after download * comment * comment * Reduce swipe close velocity * Updates per feedback * lint * bugfix * Adds delayed press-in for TouchableOpacity