about summary refs log tree commit diff
path: root/src/view/com/composer
Commit message (Collapse)AuthorAgeFilesLines
...
* Thread composer UI (#6050)dan2024-11-017-211/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Basic adding of posts * Switch active post on focus * Conditionally show plus button * Insert posts midthread * Track active/inactive post * Delete posts in a thread * Focus after deletion * Tweak empty post detection * Mix height for active only * Move toolbar with post on web * Fix footer positioning * Post All button * Fix reply to positioning * Improve memoization * Improve memoization for clearVideo * Remove unnecessary argument * Add some manual memoization to fix re-renders * Scroll to bottom on add new * Fix opacity on Android * Add backdrop * Fix videos * Check alt for video too * Clear pending publish on error * Fork alt message by type * Separate placeholder for next posts * Limit hitslop to avoid clashes
* Implement posting threads (#6049)dan2024-11-011-1/+1
| | | | | | | | | | | | | | | * Implement posting a thread Co-authored-by: Dan Abramov <dan.abramov@gmail.com> * Fix native build * Remove dependency on web crypto API * Fix unrelated TS error (wtf) --------- Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>
* Check video state for the entire thread (#5957)dan2024-11-013-76/+162
| | | | | | | | | | | | | * Switch to using post ID for post actions * Pass post-bound dispatch to ComposerPost * Check video state for entire thread * Always bind post actions to an ID * Rename variable for consistency * Fix clashing keys
* Sort imports (#6009)dan2024-10-297-20/+21
| | | | | * Mark import sort/order/style rules as error * npm run lint -- --fix
* Extend composer checks to all posts in a thread (#5955)dan2024-10-291-50/+65
| | | | | * Check all posts in a thread * Use thread for more checks
* Remove indirection when rendering composer state (#5954)dan2024-10-292-66/+40
| | | | | | | * Simplify onPressCancel dismiss condition * Remove alias variables * Move grapheme length calculation to reducer
* Refactor composer state for threads (#5945)dan2024-10-293-49/+112
| | | | | | | * Refactor composer state for threads * Remove unnecessary default case TS can see it's exhaustive.
* Disable Post button when empty (#5953)dan2024-10-291-32/+19
| | | | | | | * Disable Post button when empty * Use regular disabled button * Disable post on video error until cleared
* fix alt position (#5985)Samuel Newman2024-10-282-2/+2
|
* hailey/filter dupe labels (#5984)Hailey2024-10-281-2/+6
|
* Fix E2E tests (#5980)Hailey2024-10-281-1/+2
|
* Make composer min height conditional and align attachments (#5976)dan2024-10-283-4/+18
| | | | | | | * Make web composer min height condiitonal * Fix alignment * Fix alignment on mobile
* Don't render `ComposerPills` when unnecessary (#5975)Hailey2024-10-281-0/+6
|
* Fix missing style (#5944)dan2024-10-251-1/+1
|
* Conditionally render labels button when media exists in post (#5942)Hailey2024-10-253-139/+120
| | | | | | | * conditionally render button * update labels on remove * tweak
* Split composer into smaller components (#5941)dan2024-10-253-357/+521
| | | | | | | | | | | | | | | * Extract ComposerTopBar * Rename state variables to align with props * Extract ComposerEmbeds * Extract ComposerPills * Extract ComposerFooter * Tweak condition to be simpler * Extract ComposerPost
* Display non-post embeds in composer preview (#5647)dan2024-10-242-36/+36
| | | | | | | | | | | | | * Display non-post embeds in composer preview * Remove starter pack special case from ExternalLinkEmbed This should not be needed because starter pack composer preview now goes through the record preview codepath, just like in the feed/post view. * Hide record ext links if quote is present * Align remove buttons Remove the implicit top padding in record embeds and make it conditional, which is similar to how we treat external link embeds. This makes the X button appear in the same place for record embeds as with links.
* Include hydrated responses for other records (#5646)dan2024-10-241-6/+22
| | | | | | | * Include hydrated responses for other records * Rename meta -> view This is actually all it is now.
* Refactor post meta to return PostView (#5645)dan2024-10-242-22/+8
|
* Put ExternalEmbedRemoveBtn on top (#5887)Eric Bailey2024-10-241-1/+1
|
* Move self-label button (#5780)Hailey2024-10-173-95/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * move self label button? * rm * make sure its usable on large font sizes * tweak wording * update icon * tweaks * change button label and change opacity when no media (#5794) * Tweak it moar (#5807) * Tweak it moar * Pluralize * Labels --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: Eric Bailey <git@esb.lol>
* Add graphic media self label (#5758)Hailey2024-10-162-119/+174
| | | | Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Composer - Self label dialog ALF rewrite (#4354)Samuel Newman2024-10-163-57/+180
|
* translate video state strings (#5762)surfdude292024-10-151-5/+5
|
* Link cards (#5677)Eric Bailey2024-10-142-25/+17
| | | | | | | | | | | | | | | * New link card styles * Cleanup of consituent parts, add hover state * Fix gif alt text view * Fix alt text view more * Remove dupe * Update remove button * Remove added margin on gif
* Fix keyboard hiding alt text input after viewing DMs on iOS (#5739)Hailey2024-10-142-9/+7
|
* Remove autofocus from alt text input (#5727)Hailey2024-10-112-7/+9
| | | | | * remove autofocus from alt text input * open to full height
* ext gif check (#5725)Hailey2024-10-111-0/+2
|
* one line btn (#5700)Hailey2024-10-101-1/+1
|
* Tweak threadgate button sizing in the composer on Web (#5692)Paul Frazee2024-10-101-1/+4
| | | | | * Adjust threadgate btn sizing in composer * Tweak threadgate button size on web
* Update the email verification dialog (#5663)Hailey2024-10-101-19/+18
|
* Allow nested sheets without boilerplate (#5660)Samuel Newman2024-10-097-53/+9
| | | | Co-authored-by: Hailey <me@haileyok.com>
* Move Dialogs to Radix (#5648)Samuel Newman2024-10-082-25/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use Redix FocusTrap (#5638) * Use Redix FocusTrap * force resolutions on radix libs * add focus guards * use @radix-ui/dismissable-layer for escape handling * fix banner menu keypress by using `Pressable` * add menu in dialog example to storybook --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> * use DismissableLayer/FocusScope for composer * fix storybook dialog * thread Portal through Prompt and avatar/banner * fix dialog style regression * remove tamagui --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Nicer error message for disabled quotes (#5644)dan2024-10-081-0/+3
|
* Move remaining composer state into reducer (#5623)dan2024-10-073-79/+109
| | | | | | Co-authored-by: Mary <git@mary.my.id> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* Fetch link previews from RQ (#5608)dan2024-10-076-421/+206
| | | | | Co-authored-by: Mary <git@mary.my.id> Co-authored-by: Hailey <me@haileyok.com>
* Use composer state as source of truth for embeds/links on publish (#5606)dan2024-10-072-7/+13
| | | | | Co-authored-by: Mary <git@mary.my.id> Co-authored-by: Hailey <me@haileyok.com>
* [Video] Add dimension info to share intent (#5639)Hailey2024-10-071-1/+1
|
* use tabular numbers in CharProgress (#5631)surfdude292024-10-071-1/+7
|
* Fix composer char progress layout (#5620)Hailey2024-10-062-70/+71
| | | | | * fix composer * more fixes
* Add alt text limit to image dialog (#5611)Eric Bailey2024-10-054-117/+230
| | | | | | | | | | | | | | | | | | | * Add alt text limit to image dialog * GIF alt text too * Fix * tweaks, save alt on dialog dismiss * simplify close behavior * use state in gif alt * state --------- Co-authored-by: Hailey <me@haileyok.com>
* [Sheets] [Pt. 1] Root PR (#5557)Hailey2024-10-049-292/+342
| | | | | | | 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>
* Make composer reducer source of truth for images/video when publishing (#5595)dan2024-10-053-33/+74
| | | | | * Move caption and altText state into video reducer * Make composer state source of truth for images and video publish
* Track links and embeds in the composer reducer (#5593)dan2024-10-052-17/+151
| | | | | | | | | * Scaffold embed draft types These don't map 1:1 to the record structure. Rather, we select data from the draft on posting. * Prefill initial quote * Implement the reducer
* Rename some files and variables (#5587)dan2024-10-034-73/+462
| | | | | | | * Move composer reducers together * videoUploadState -> videoState * Inline videoDispatch
* Manage video reducer from composer reducer (#5573)dan2024-10-032-21/+103
| | | | | | | | | | | | | | | * Move video state into composer state * Represent video as embed This is slightly broken. In particular, we can't remove video yet because there's no action that results in video embed being removed. * Properly represent video as embed This aligns the video state lifetime with the embed lifetime. Video can now be properly added and removed. * Disable Add Video when we have images * Ignore empty image pick
* Refactor video uploads (#5570)dan2024-10-032-57/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused video field * Stop exposing video dispatch * Move cancellation out of the reducer * Make useUploadStatusQuery controlled by jobId * Rename SetStatus to SetProcessing This action only has one callsite and it's always passing "processing". * Move jobId into video reducer state * Make cancellation scoped * Inline useCompressVideoMutation * Move processVideo down the file * Extract getErrorMessage * useServiceAuthToken -> getServiceAuthToken * useVideoAgent -> createVideoAgent * useVideoUploadLimits -> getVideoUploadLimits * useUploadVideoMutation -> uploadVideo * Use async/await in processVideo * Inline onVideoCompressed into processVideo * Use async/await for uploadVideo * Factor out error messages * Guard dispatch with signal This lets us remove the scattered signal checks around dispatch. * Move job polling out of RQ * Handle poll failures * Remove unnecessary guards * Slightly more accurate condition * Move initVideoUri handling out of the hook * Remove dead argument It wasn't being used before either. * Remove unused detailed status This isn't being used because we're only respecting that state variable when isProcessing=true, but isProcessing is always false during video upload. If we want to re-add this later, it should really just be derived from the reducer state. * Harden the video reducer * Tie all spawned work to a signal * Preserve asset/media for nicer error state * Rename actions to match states * Inline useUploadVideo This abstraction is getting in the way of some future work. * Move MIME check to the only place that handles it
* Introduce a composer reducer and move image state there (#5547)dan2024-10-023-16/+160
| | | | | | | | | | | | | | | | | | | * Add composer reducer * Support adding images Co-authored-by: Mary <git@mary.my.id> * Support updating and deleting images Co-authored-by: Mary <git@mary.my.id> * Derive images state from composer state Co-authored-by: Mary <git@mary.my.id> --------- Co-authored-by: Mary <git@mary.my.id>
* Rework native autocomplete (#5521)Hailey2024-09-272-108/+93
| | | | Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Remove Segment (#5518)Hailey2024-09-274-21/+2
|