about summary refs log tree commit diff
path: root/src/view/com/composer
Commit message (Collapse)AuthorAgeFilesLines
* [Video] Uploads (#4754)Hailey2024-07-304-112/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Replace `import hairlineWidth =` with const (#4831)Samuel Newman2024-07-252-7/+5
| | | | | | | | | * replace import with const * just use `StyleSheet.hairlineWidth` --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Use appropriate icons for toasts (#4803)Samuel Newman2024-07-231-1/+1
| | | | | | | | | | | | | * 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>
* Fix: emoji picker closes when hitting spacebar (#4422) (#4441)Michał Gołda2024-07-111-21/+23
| | | | Co-authored-by: Hailey <me@haileyok.com>
* ALF post button (#4767)Hailey2024-07-101-38/+35
|
* Fix alt text for GIFs (#4766)Hailey2024-07-101-2/+7
| | | | | * fix alt text dialog for gifs * only apply to native
* Video compression in composer (#4638)Samuel Newman2024-07-0511-32/+360
| | | | | Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* Add starter pack embeds to posts (#4699)Hailey2024-07-041-0/+20
| | | | | | | | | | | | | | | | | | | | | | | * starter pack embeds * revert test code * Types * add `BaseLink` * precache on click * rm log * add a comment * loading state * top margin --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Fix pasting images on web (#4670)dan2024-06-271-8/+7
|
* Better starterpack embed (#4659)Hailey2024-06-261-0/+13
|
* Composer - replace threadgate modal with alf dialog (#4329)Samuel Newman2024-06-241-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace threadgate modal with alf dialog * add accessibility to selectable * add aria * hide spinner once fetched * add `hasOpenDialogs` value to context * remove state * Rm loading state * Update the threadgate dialog button theming * Factor out the threadgate editor and add editing to post views * Mark messages for localization * Use colors from mute dialog * Remove unnecessary effect * Reset state on dialog dismiss * Clearer CTA * Fix bugs * Scope keyboard fix * Rm getAreDialogsActive (no longer needed) --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* use granular permission of for media perm request (#4609)Hailey2024-06-241-1/+1
|
* Wait for AppView when posting (#4584)dan2024-06-201-0/+34
|
* Calculate correct keyboard offset in composer (#4500)Samuel Newman2024-06-131-2/+17
| | | | | | | * calculate correct keyboard offset * give viewHeight a default value * much simpler approach
* Prevent rich-formatting paste (#4327)Mary2024-06-131-8/+19
| | | | | * fix: prevent rich-formatting paste * fix: return true instead of preventDefault
* Only enable keyboard controller when necessary (#4483)Samuel Newman2024-06-112-186/+163
| | | | | | | | | | | | | | | | | | | * Only enable keyboard controller when necessary * make it screen only * rm keyboard padding * rm keyboardpadding file * revert using keyboard controller in composer * remove styles.outer (unnecessary for revert) * continue to use keyboard padding in the report dialog for dms --------- Co-authored-by: Hailey <me@haileyok.com>
* Revert to old modal on android (#4458)Samuel Newman2024-06-111-40/+27
| | | | | | | | | | | | | | | | | * revert to old modal on android * close alf dialogs before closing composer * Try to fix white area * Use hook * Fix Back button * oops --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Give a meaningful error in the composer when replying to a deleted post (#4464)Paul Frazee2024-06-101-3/+10
|
* Reliably focus keyboard on Android (#4427)dan2024-06-071-7/+25
|
* Composer - backup android focus (#4415)Samuel Newman2024-06-071-0/+13
| | | | | * backup android focus * bump to 300ms just to make sure it catches all of them
* scope enable/disable of keyboard controller in composer to only android (#4412)Hailey2024-06-061-1/+1
|
* disable keyboard controller in the composer screen (#4399)Hailey2024-06-061-0/+12
| | | | | | | | | | | | | | | * disable keyboard controller in the composer screen * add comment * oops * destructure * rename to keyboard context for clarity * move destructure * cleanup
* Composer - make sure android keyboard opens (#4390)Samuel Newman2024-06-061-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * keep trying to open keyboard until it's open * limit number of retries * keep the original 50ms one as well * Proper fix! * disable autoFocus if not visible * Reset derived state * Revert "Reset derived state" This reverts commit 71f57391ae78bac717282e699d1b83cbd87771eb. * Use derived state pattern * Rename for clarity --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* use a timeout to focus the composer input (#4370)Hailey2024-06-051-1/+8
| | | | | | | | | | | * use a timeout to focus the composer input * scope to just android * scope useEffect to just android as well * oops * cleanup
* Composer - unbork web (#4344)Samuel Newman2024-06-041-11/+2
| | | | | | | * reduce side gap + add overflow hidden also remove the animations since they don't appear in prod, and are kinda broken * removed fixed height to fix alt text
* Composer - make bottom border more consistent when typing (#4343)Samuel Newman2024-06-041-10/+10
| | | | | | | | | | | * floor values * fix last line being obscured * Rm unnecessary runOnUI --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Native `formSheet` for GIF select on iOS (#4328)Samuel Newman2024-06-042-9/+7
| | | | | | | | | * native formsheet for gif select * trigger confirm discard if have gif * give modal a background color * fix web top bar - unrelated but I cba to make a separate PR
* Composer - add animated bottom border (#4325)Samuel Newman2024-06-042-26/+128
| | | | | | | | | | | | | | | | | | | * start adding bottom border (wip) * add content change listener * add layout listener and move to hook * remove logs * use square-er image icon * visually align bottom bar icons * reduce keyboard vertical offset slightly * only add border to top/bottom * run worklet function on UI thread
* Composer - fix modals, and other tweaks (#4298)Samuel Newman2024-05-313-116/+121
| | | | | | | | | | | | | | | | | | | * fix depreciated import * add animations to old dropdown * wrap modals in fullwindowoverlay * move errors inside header * add background to bottom bar and stop overlap * nest dialogs on android * fix android (wrap in gesturehandlerrootview) * make borders all the same color * revert threadgate button back to solid
* Change many border widths from `1` to `hairlineWidth` (#4294)Hailey2024-05-312-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feed items * update some more * moar * profile card * composer and notifications * settings screen * remove border from first item in feeds * remove border from first item in feeds * more removal of top border * fix flatlist rendering * oops * scroll to top fab * a.border * centeredview/list * placeholder * web sidebar * search posts * feeds list * user lists * list header * account list width 1 * hide top border feedgens * same for lists * fix tab bar web desktop * wait... * show the border on desktop web * fix lists * fix lists * round
* Reduce Threadgate button size (#4287)dan2024-05-301-1/+1
|
* put dropdown in fullscreenoverlay on iOS (#4284)Samuel Newman2024-05-301-13/+14
|
* Composer - Use sheet presentation on iOS (#4278)Samuel Newman2024-05-302-10/+8
| | | | | | | * use sheet presentation + tweak spacing * line up elements + add hitslop to cancel * fixing spacing on replies
* Composer - fix divider when replying to someone (#4279)Samuel Newman2024-05-302-7/+13
| | | | | | | * move replyto border to beneath * use hairline width for consistency * fix border colors
* only show divider when scrolled (#4275)Samuel Newman2024-05-302-19/+54
|
* Use `<Modal>` for Composer (#3588)Samuel Newman2024-05-302-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use <Modal> to display composer * trigger `onPressCancel` on modal cancel * remove android top padding * use light statusbar on ios * use KeyboardStickyView from r-n-keyboard-controller * make extra bottom padding ios-only * make cancelRef optional * scope legacy modals * don't change bg color on ios * use fullScreen instead of formSheet * adjust padding on keyboardaccessory to account for new buttons * Revert "use KeyboardStickyView from r-n-keyboard-controller" This reverts commit 426c812904f427bdd08107cffc32e4be1d9b83bc. * fix insets * tweaks and merge * revert 89f51c72 * nit * import keyboard provider --------- Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Replace getAgent() with reading agent (#4243)dan2024-05-283-10/+10
| | | | | * Replace getAgent() with agent * Replace {agent} with agent
* Add padding to dialogs when keyboard is open on Android (#4182)Hailey2024-05-231-0/+2
| | | | | | | | | * add keyboard padding to android dialogs * missing `keyboardDismissMode` for `ScrollableInner` * add to `MutedWords` * add to `LabelsOnMe`
* Switch to a more visually obvious button for the threadgate (#4139)Paul Frazee2024-05-202-47/+35
| | | | | | | * Switch to a more visually obvious button for the threadgate * Move threadgate button into the keyboard-sticky area * Fix keyboard offset
* [🐴] Fully implement keyboard controller (#4106)Hailey2024-05-191-162/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "[🐴] Ensure keyboard gets dismissed when leaving screen (#4104)" This reverts commit 3ca671d9aacb6137e10e2cf3cd9bc170af798389. * getting somewhere * remove some now nuneeded code * fully implement keyboard controller * onStartReached check * fix new messages pill alignment * scroll to end on press * simplify pill scroll logic * update comment * adjust logic on when to hide the pill * fix backgrounding jank * improve look of deleting messages * add double tap on messages * better onStartReached logic * nit * add hit slop to the gesture * better gestures for press and hold * nits
* lowcase ALT text (#3934)Samuel Newman2024-05-091-1/+1
|
* [GIFs] Restore default alt text (#3893)Samuel Newman2024-05-072-16/+40
| | | | | | | | | | | | | | | | | | | | | | | * restore default alt text * factor out gif alt logic + enable require alt text setting * rm console.log * don't prefill input + esc handling * typo * Nits * shorten user alt prefix * Remove unnecessary condition, rename for clarity * Add comment --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Alt text for gifs (#3876)Samuel Newman2024-05-064-37/+262
| | | | | | | | | | | | | | | | | | | | | * add alt text dialog * multiline alt text input * add pressable alt text badge * rename `ALT: ` to `Alt text: ` to avoid including old bad ones * reuse alt text reminder * reuse alt text reminder in gallery * add alt text reminder in the dialog itself * autofocus text input * reorder components to fix tab order * fix close btn position
* remove precacheThreadPostProfiles (#3729)Hailey2024-04-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove `precacheThreadPostProfiles` * add `displayName` to `PreviewableUserAvatar` * memo * use `precacheProfile` * pass `profile` directly to `PreviewableUserAvatar` * update the `UserAvatar`'s props * remove feed cache * one more spot * rm unused queryClient * Don't call fn unnecessarily * Preload for display name too * try notification item * add to feeditem * and finally, precache for post threads * timestamp * Fix * onBeforePress --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Add `useAgent` hook and replace (#3706)Eric Bailey2024-04-253-15/+20
| | | | | | | | | | | * Hook it up * Memoize getAgent method * Use one shared reference --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Rewrite the link detection (#3687)dan2024-04-243-87/+110
| | | | | * Rewrite the link detection * Handle parens and colons
* Remove unnecessary `.trimEnd()` and fix facet detection (#3672)Hailey2024-04-242-12/+23
| | | | | | | | | | | | | | | * Fix link facet detection Exclude the trailing period from the link, similar as done in the atproto package * Fix JSON to text conversion The trimEnd() call was only needed because we were always appending \n\n at the end. Fix that by only adding line breaks after non-final paragraphs. * Detect paste reliably --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Add option to remove quoted post in composer (#3670)Samuel Newman2024-04-241-3/+8
| | | | | * add option to remove quoted post * add generous hitslop
* GIF Viewer (#3605)Hailey2024-04-232-26/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ios player autoplay after recycle remove all items from AVPlayer queue recurururururursion use managers in the view add prefetch make sure player items stay in order add controller and item managers start of the view create module, ios * android player smoother basic caching prep cache somewhat works backup other files android impl blegh lets go touchup add prefetch to js use caching * bogus testing commit * add dims to type * save * add the dimensions to the embed info * add a new case * add a new case * limit this case to giphy * use gate * Revert "bogus testing commit" This reverts commit b3c8751b71f7108de9aa843b22ded4e0249fa854. * add web player base * flip mp4/webp * basic mp4 player for web * move some stuff into `ExternalLinkEmbed` instead * use a class component for web * remove extra component * add `onPlayerStateChange` event type on web * layer properly * fix tests * add new test * about ready. native portions done, a few touch ups on web needed show placeholder on ios fix type rm log display thumbnail until video is ready to play add oncanplay, playsinline remove unused method add `isLoaded` change event release player when finished apply gc to the view cleanup logs android gc rm log automatic gc for assets make `nativeRef` private remove unnecessary `await` cleanup rev log only play on prepare whenever needed rm unused perfperfperf rm var comment + android width native height calculations rm pressable add event dispatcher on android add event dispatcher on ios * ready to test ios fix autoplay ios clean oops * autoplay on web * normalize across all platforms add check for `ALT:` separate gif embed logic to another file handle permissions requests flatten web styles normalize styles normalize styles prefetch functions pause animatable on foreground android nits one more oops idk where that code went lint rethink the usage wrap up android clear bg update gradle more android rename dir update android namespace web ios add deps use webp rm unused update types use webp on mobile * rm gate from types * remove unused event param * only start placeholder op if doesn't exist in disk cache * fix gifs animating on app resume android * remove comment * add `isLoaded` for ios * add `isLoaded` to Android * onload for web * add visual loading state * rm a log * implement isloaded for android * dialogs * replace `webpSource` with `source` * update prop name * Move to Tenor for GIFs (#3654) * update some urls * right order for dimensions * add GIF coder for ios * remove giphy check * rewrite tenor urls * remove all the unnecessary stuff for consent * rm print * rm log * check if id and filename are strings * full size playback controls * pass tests * add accessibility to gifs * use `onPlay` and `onPause` * rm unused logic for description * add accessibility label to the controls * add gif into to external embed in composer * make it optional * gif dimensions * make the jsx look nicer --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* [GIFs] Replace GIPHY with Tenor (#3651)Samuel Newman2024-04-222-9/+10
| | | | | | | | | * replace GIPHY with Tenor * remove "directly" wording * replace GIPHY wording * remove log