about summary refs log tree commit diff
path: root/src/lib/media
Commit message (Collapse)AuthorAgeFilesLines
* Add gif support to web (#6433)Samuel Newman2024-11-221-0/+4
| | | | | | | | | | | | | * add gif support to web * rm set dimensions * rm effect from preview * rm log * rm use of {cause: error} * fix lint
* [Lightbox] Always rely on Expo Image cache (#6189)dan2024-11-091-93/+0
| | | | | | | | | | | | | | | * 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
* use megabytes rather than mebibytes for video limit (#6117)Samuel Newman2024-11-051-1/+1
|
* Unify dimensions cache between lightbox and feed (#6047)dan2024-11-041-21/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Sort imports (#6009)dan2024-10-292-2/+3
| | | | | * Mark import sort/order/style rules as error * npm run lint -- --fix
* Translate some missing strings via global i18n instance (#5740)Samuel Newman2024-10-141-3/+5
|
* [Sheets] [Pt. 1] Root PR (#5557)Hailey2024-10-042-2/+2
| | | | | | | Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com>
* Rename some files and variables (#5587)dan2024-10-035-1/+289
| | | | | | | * Move composer reducers together * videoUploadState -> videoState * Inline videoDispatch
* Remove image resizer (#5464)Hailey2024-09-241-16/+58
|
* Remove `react-native-fs` (#5463)Hailey2024-09-251-11/+23
| | | | | | | | | * remove rnfs * tweak e2e * log * use `safeDeleteAsync`
* Revamp image editor (#5462)Mary2024-09-252-2/+7
| | | | | | | | | * new image editor * Rm react-avatar-editor --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* MobX removal take 2 (#5381)Mary2024-09-251-1/+1
| | | | | | | | | * mobx removal take 2 * Actually rm mobx --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* fix min size for compression (#5272)Samuel Newman2024-09-111-9/+10
|
* [Video] TEMP disable skip compression (#5271)Samuel Newman2024-09-111-9/+9
|
* [Video] use correct max size (#5245)Samuel Newman2024-09-092-3/+3
| | | | Co-authored-by: Hailey <me@haileyok.com>
* [Video] Upload tweaks (#5228)Samuel Newman2024-09-081-1/+2
| | | | | * use correct mime type * fix wheel progress
* [Video] Fix type on web (#5211)Hailey2024-09-071-2/+4
|
* [Video] Check upload limits before uploading (#5153)Samuel Newman2024-09-071-0/+7
| | | | | | | | | | | | | | | | | * DRY up video service auth code * throw error if over upload limits * use token * xmark on toast * errors with nice translatable error messages * Update src/state/queries/video/video.ts --------- Co-authored-by: Hailey <me@haileyok.com>
* [Video] Only compress if >25mb or unknown format (#5187)Samuel Newman2024-09-071-2/+15
| | | | Co-authored-by: Hailey <me@haileyok.com>
* fix mime checks (#5118)Samuel Newman2024-09-031-1/+1
|
* [Video] Upload errors and UI improvements (#5092)Samuel Newman2024-09-034-1/+11
| | | | | | | | | | | * surface errors in UI * style progress indicator * remove job status progress * rm log * fix webm ext
* [Videos] avoid using fetch for blob handling where possible (#5041)Samuel Newman2024-08-303-12/+40
| | | | | | | * avoid using fetch where possible * whoopsie wrong branch * more import fixes
* [Video] Make compress/upload cancelable (#4996)Samuel Newman2024-08-292-5/+12
| | | | | | | * add abort controller to video upload system * rm log * rm log 2
* [Video] Add uploaded video to post (#4884)Samuel Newman2024-08-291-36/+0
| | | | | | | | | | | | | | | | | | | | | * video uploads! * use video upload lexicons * add missing postgate * remove references to prerelease package * fix scrubber showing a "0" * Delete types.ts * rm logs * rm upload header --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Upgrade API, implement XRPC rework (#4857)Hailey2024-08-121-7/+1
| | | | Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
* [Video] Uploads (#4754)Hailey2024-07-301-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * state for video uploads * get upload working * add a debug log * add post progress * progress * fetch data * add some progress info, web uploads * post on finished uploading (wip) * add a note * add some todos * clear video * merge some stuff * convert to `createUploadTask` * patch expo modules core * working native upload progress * platform fork * upload progress for web * cleanup * cleanup * more tweaks * simplify * fix type errors --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Use appropriate icons for toasts (#4803)Samuel Newman2024-07-231-2/+2
| | | | | | | | | | | | | * use appropriate icons for toasts * use info for session expiry * tweak size * message -> safeMessage --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Video compression in composer (#4638)Samuel Newman2024-07-053-0/+64
| | | | | Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* add `legacy` to picker for Android (#4377)Hailey2024-06-051-1/+3
| | | | | * add `legacy` to picker * add for the other callsite
* match web version exports (#4257)Samuel Newman2024-05-291-0/+4
|
* New onboarding tests (#3996)Paul Frazee2024-05-131-8/+17
| | | | | | | * Add onboarding test * Add onboarding avatar-creator test * Update profile screen edit test
* Delete the entire temporary directory instead of just the temp file, also ↵Hailey2024-05-131-13/+18
| | | | | | | use `cacheDirectory` over `documentDirectory` (#3985) * lint * remove extra arg
* ✅ Fix "Download CAR file" on mobile (#3816)Matthieu Sieben2024-05-122-3/+96
| | | | | | | | | | | | | | | | | | | | | | | | | * download CAR file using AtpAgent instead of building URL * add loader icon on download car button * actually save to disk on android * style nits * bottom margin nit * localize toast * remove fallback so back button works correctly * keep throwing an error if mime type isn't used * be more explicit with toasts * send errors to sentry when encountered --------- Co-authored-by: Hailey <me@haileyok.com>
* [Reduced Onboarding] Add profile step (#3933)Eric Bailey2024-05-111-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Onboarding avatar creator or upload (#2860) * add screen to onboarding flow * update base * add icon * fix icon * fix after merge * create flatlist * add emoji list * add state context, pressables * select/update * add camera icon * add photo selection button * image selection * cleanup * add most needed icons * fix icon naming * add icons * export path strings for emoji * canvas drawing for web * types * move breakpoints to individual steps * create canvas * canvas working 🎉 * update state * it works! * working on both platforms * remove comments * remove log * remove unused web canvas * animate picture selection/removal * compress images on web correctly * add times icon * scrollable horizontal flatlist on web * prefetch * adjustments * add more assets * remove unused smiles * add all the icons * adjust color options * animate grow/shrink selections * change layout on tablet/desktop * better web layout * fix path * adjust web layout * organize * organize imports and cleanup styles * make generated images smaller * implement design changes use row for buttons on web use RNGH FlatList random color at start improve logic update dialog for web update dialog style on mobile some more progress create dialog simplify context start implementing design * rm change * cleanup imports * trigger a pr label * Formatting --------- Co-authored-by: Eric Bailey <git@esb.lol> (cherry picked from commit 087186e3867b0eefb11a056b0b644f5585fa16bd) * UI tweaks * Revert layout change * Gate avi upload * Support returning to profile step * Add Statsig --------- Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Dont leave promise unresolvedPaul Frazee2024-05-061-1/+3
|
* allow for custom cropper aspect ration based on imagePiotr P2024-04-271-0/+4
|
* Fix cropper crashing after clicking cancelPiotr P2024-04-271-3/+1
|
* eslint autofixesPiotr P2024-04-272-2/+4
|
* Cleanup files after each iteration of compression and downloading (#3599)Hailey2024-04-251-14/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | * delete image on each iteration of compression * replace a few other instances of `unlink()` * ensure that moving to the permanent path will succeed * use `cacheDirectory` * missing file extension? * assert * Remove extra . * Extract safeDeleteAsync, fix normalization * Normalize everywhere * Use safeDeleteAsync in more places * Delete .bin too --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Ignore image responses on non-200 status (#3693)dan2024-04-241-5/+11
| | | | | * Ignore image responses on non-200 status * Fix tests
* Various e2e test fixes (#3284)Paul Frazee2024-03-191-2/+1
| | | | | | | | | | | | | * Just use the first picture every time * Add missing testIDs * Various test fixes * Use simplified link fetcher for e2e * Disable tests for now-n * Update test-env creation
* filter out files with non-image mime typesSamuel Newman2024-03-131-7/+14
|
* Update tests to get them passing again (#2853)Paul Frazee2024-02-121-1/+2
|
* fix: listen for error event on image (#2736)Mary2024-02-051-0/+3
|
* Multiple improvements to link cards and quote posts (#2398)Paul Frazee2024-01-031-6/+4
| | | | | | | | | | | | | | | * fix canvas * fix external link embed styles * Use the same link-card style on web and mobile and give a little more height on desktop to the card images * Use dark border on link embeds to match quote post style * Fix the highlighting behavior on linkcards and quoteposts --------- Co-authored-by: Hailey <me@haileyok.com>
* ensure no more than four assets, show toast if moreHailey2023-12-291-1/+6
|
* Remove deprecated models and mobx usage (react-query refactor) (#1934)Paul Frazee2023-11-161-0/+34
| | | | | | | | | | | | | | | | | | | | | * 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
* Fix openCamera, openCropped, lightbox model, and image model usages (#1908)Eric Bailey2023-11-142-16/+3
|
* Composer update (react-query refactor) (#1899)Paul Frazee2023-11-142-18/+4
| | | | | | | | | * Move composer state to a context * Rework composer to use RQ --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Add modal state provider, replace usage except methods (#1833)Eric Bailey2023-11-082-14/+3
| | | | | | | | | | | | | * Add modal state provider, replace usage except methods * Replace easy spots * Fix sticky spots * Replace final usages * Memorize context objects * Add more warnings