Commit Graph

3680 Commits (3ca41e4efb24809dcc5e5a5c3e678eb561fd7ad6)

Author SHA1 Message Date
Eric Bailey 80ce6f980e
[Reduced Onboarding] Add new step, new state to reducer (#3931)
* Add new step, new state to reducer

* Don't set default feeds
2024-05-11 05:19:16 +01:00
Eric Bailey 08979f37e7
Movable following feed (#3593)
* Handle home algo with backwards compat

* Remove todo, fix pwi view

* Simplify filter logic

* Handle edge case

* Handle home algo in FeedSourceCard

* Fix handling of pinned feed if home algo is disabled

* Handle home algo on ProfileFeed screen

* Rename

* Fix pinned feeds key

* Improve perf of pinned feeds with primary algo

* Update statsig API

* Revert unneeded changes

* Support following feed as well

* Better formatting

* Clarify primary algo usage

* Better comment

* Handle saved feed screen edge case

* Restore Feeds sparkle, fix line height

* Move gate call down

* Filter out primary algo from feeds page

* Filter dupe from Feeds screen

* Simplify logic

* Missing following handling

* Hide primary feed setting outside exp

* Revert testing change

* Migrate usePinnedFeedInfos

* Migrate FeedSourceCard

* Migrate Feeds screen

* Migrate SavedFeeds screen

* Handle timeline in feed infos

* Finish migrating ProfileFeed, FeedSourceCard

* Migrate ProfileList

* Finalize mutation hooks

* Allow unsaving lists

* Handle following feed on Feeds screen

* Handle following on SavedFeeds

* Get rid of deprecated interface usages

* Handle no pinned feeds

* Handle no feeds on Feeds screen

* Reuse component on SavedFeeds screen

* Handle no following feed

* Remove primary algo references

* Migrate to new plural APIs

* Remove unused event

* Prevent duplicate keys

* Make handling much more clear

* Dedupe useHeaderOffset

* Filter unknown feed types at source

* Use just following

* Immprove key handling

* Resume from last tab

* Bump sdk

* Revert Gemfile

* Additional protection in FeedSourceCard

* Fix ProfileList save/unsave handling

* Translate

* Translate

* Match existing handling post-signup

* Ensure onboarding results in correct selected feeds

* Some testing tweaks on create/onboarding

* Revert primary algo consderations

* Remove comment

* Handle default feed setting

* Rm unnecessary type cast

* Remove premature gate check

* Remove nullable check in onPageSelecting, assume the pager checks bounds

* Use null for default selected feed

* Rm unrelated change

* Remove the concept of __key__

I don't think this concept is consistent.

It's introduced on FeedSourceInfo which is used both by pinned feeds and by useFeedSourceInfoQuery. Pinned feeds use the pinning ID there. But there is no pinning ID for useFeedSourceInfoQuery. So this means this field is sometimes one thing and sometimes some other thing. That is a decent sign that it shouldn't be on that type at all.

It's not used anywhere except the desktop feed enumeration. It seems reasonable to assume there that we wouldn't want to show the same feed URL twice. (And if it does occur in the array twice, IMO we should solve that at the API level and dedupe it on read or next write.) So I think we should just use the URL in that place. (I used the descriptor, which is equivalent.)

* Dedupe pinned feeds by URL on read

* Filter timeline out of mergefeed sources

* Put FeedDescriptor into FeedSourceInfo

* Group saved info with feed for pins

This removes a loop within a loop within a loop.

* Fix Feeds link on native

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-11 04:39:21 +01:00
Eric Bailey 2974ce1b20
Gate chat icon in bottom bars (#3959) 2024-05-10 18:02:33 -05:00
Eric Bailey f84a2def29
[🐴] Simplify message passing, cleanup (#3952)
* Simplify message passing

* Setup/teardown events
2024-05-10 12:44:55 -05:00
Samuel Newman ab21aafc28
[🐴] Report message dialog (#3941)
* message report dialog

* report chat prompt

* typo

* 100% height sheet on android

* messages-specific report options

* restore unwanted sexual content

* chat -> conversation
2024-05-10 17:52:21 +01:00
Samuel Newman 7370bebf07
remove 12hr time (#3954) 2024-05-10 17:36:06 +01:00
Eric Bailey cf981124e4
Add icons to drawer (#3956) 2024-05-10 11:08:53 -05:00
Hailey 9f6552241f
bump max width of message (#3955) 2024-05-10 09:04:03 -07:00
Hailey f928e0a547
[🐴] Mutate data instead of invalidating queries when muting or unmuting (#3946)
* mutate for mutes

* mutate data for mutes

* add initial data, `useConvoQuery` in `ConvoMenu`

* `useInitialData`

* don't use `identifier` for notifications, use `dates` instead

* better implementation

* simplify

* simplify

* fix types
2024-05-10 08:46:51 -07:00
Eric Bailey 8f56f79c6c
[🐴] Change up icons (#3938)
* Swap for chat icon

* Replace icons in left nav

* Replace icons in bottom bars

* Ditch feeds, drop size

* Fine tune

* Swap bell icon, improve alignment and size
2024-05-10 10:42:45 -05:00
Eric Bailey d7f3a8d01f
[🐴] Clean up after deleting message (#3950)
* Clean up after removal

* Remove console
2024-05-10 10:40:52 -05:00
Hailey 54c4baacb6
[🐴] Move `KeyboardAvoidingView` up to the main screen (#3953) 2024-05-10 08:24:29 -07:00
Hailey e729647c02
[🐴] Adjust messages list styles (#3945)
* some initial tweaks

* tweaks

* more tweaks

* tweak chat header

* properly align placeholders

* tweak web header

* one more...

* remove extra loading states from chat

* limit line count for display name

* Tweaks styles (#3949)

* Adjust sizing

* Consistent font size

* Adjust header

* oops

* fix accessibility in list

* don't use `identifier` for notifications, use `dates` instead

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-10 08:09:00 -07:00
Hailey 1a90426026
[🐴] Remove extra spinner states from chat screen (#3947)
* remove extra loading states from chat

* nits

* fix scrolling animation to bottom

* nit

* move spinner to top
2024-05-10 07:49:08 -07:00
Eric Bailey 195c9f1045
[🐴] Handle errors, improve styling (#3937)
* Handle errors, improve styling

* Remove old UI
2024-05-10 08:23:37 -05:00
Hailey 1821a992ab
Use build arg in docker action to correctly pass git commit SHA (#3940)
* use env variables through docker args

* remove quotes

* use an output instead

* try that again

* write the variables to .env

* rm unused

* use short sha

* remove test branch
2024-05-09 17:29:25 -07:00
dan 6e172b6ce3
[Session] Restore emailAuthFactor and emailConfirmed from last session (#3939) 2024-05-09 16:05:44 -07:00
Eric Bailey 55fdbc7399
Add retries to all handlers (#3935) 2024-05-09 16:31:36 -05:00
Samuel Newman becc708c61
[🐴] Rich text in messages (#3926)
* add facets to message

* richtext messages

* undo richtexttag changes

* whoops, don't redetect facets

* dont set color directly

* shorten links and filter invalid facets

* fix link shortening

* pass in underline style
2024-05-09 21:08:56 +01:00
Samuel Newman 03b2796976
lowcase ALT text (#3934) 2024-05-09 20:58:22 +01:00
Hailey 17e3b946cb
Handle push notifications for DMs (#3895)
* add some better handling for notifications

prep merge

move `useNotificationsListener` into shell

progress

better structure

only show messages notifications while using app if it is the current account

progress

only emit on native

current chat emitter

only show alerts for the current chat

type

add logs

setup handlers

* remove event emitter

* just needs cleanup

* oops

* remove unnecessary `queryClient` param

* few fixes

* cleanup

* nit

* remove folds

* remove comment

* simplify if

* add back invalidate

* comment out other navigations for now

* rename type

* handle various navigation cases

* push to conversation from notification

* update badge in all cases except `chat-message`

* ensure no duplicate notifications

* rm unused `animationOnReplace`

* revert to using `goBack` in the conversation header

* add todo comment
2024-05-09 10:04:05 -07:00
Eric Bailey 1341845537
Add gate, a:a swap onboarding state (#3930) 2024-05-09 11:34:36 -05:00
Hailey 2fe76333bc
[🐴] Add hover context menu for convo list on web (#3923)
* remove some unnecessary props

* add hover trigger on web for convo list

* lint

* use `UserAvatar` to not affect accessibility

* remove extra wrapper

* add `label`

* always show on mobile

* adjust size of dots

* make the message trigger dots the same size

* 
2024-05-09 09:07:57 -07:00
Samuel Newman 55ac287d5e
[🐴] Skeleton header (#3921) 2024-05-08 17:08:24 -07:00
Eric Bailey 3bac0182b5
[🐴] Integrate event bus (#3915)
* Integrate event bus

* Fixes

* Move events mgmt into Convo class

* Clean up poll interval updates

* Remove unused

* Remove annoying log
2024-05-08 18:01:07 -05:00
Eric Bailey ce2eddca8e
[🐴] Refactor event bus (#3919)
* Refactor to singleton class outside react

* Fix retry, remove debug logs
2024-05-08 17:41:10 -05:00
dan 0c6bf276dd
Replace updateCurrentAccount() with refreshSession() (#3910)
Replace updateCurrentAccount() with resumeSession()
2024-05-08 23:11:39 +01:00
Hailey f62b0458a7
[🐴] Adjust press and hold delay on messages (#3918)
* adjust press and hold delay on messages

* adjust hit slop
2024-05-08 13:56:36 -07:00
Samuel Newman 701e508a1a
add sideborders prop (#3920) 2024-05-08 21:44:49 +01:00
Samuel Newman 750a5c899b
actually optimistic mark as read (#3917) 2024-05-08 21:19:45 +01:00
Eric Bailey 7d06fb9432
Move to requestPollInterval handling (#3914) 2024-05-08 11:34:04 -05:00
bnewbold f3515e2673
use four-digit years for RSS pubDate (#3907) 2024-05-08 09:33:38 -07:00
Samuel Newman 38198fdf7f
[🐴] Mark as read in convo menu (#3913)
* add mark as read option

* optimistic update + link up menu

* rm messageid
2024-05-08 15:48:05 +01:00
Eric Bailey 56f713077f
[🐴] Reorg convo files (#3909)
* Remove unused prop

* Reorganize
2024-05-07 19:46:59 -07:00
dan 814ec2bd7f
Add session reducer tests (#3860) 2024-05-08 03:34:35 +01:00
dan 0910525e2e
[Session] Code cleanup (#3854)
* Split utils into files

* Move reducer to another file

* Write types explicitly

* Remove unnnecessary check

* Move things around a bit

* Move more stuff into agent factories

* Move more stuff into agent

* Fix gates await

* Clarify comments

* Enforce more via types

* Nit

* initSession -> resumeSession

* Protect against races

* Make agent opaque to reducer

* Check using plain condition
2024-05-08 03:30:55 +01:00
Samuel Newman 4fe5a869c3
[🐴] Unread messages badge (#3901)
* add badge

* move stringify logic to hook

* add mutation hooks

* optimistic mark convo as read

* don't count muted chats

* Integrate new context

* Integrate mark unread mutation

* Remove unused edit

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 21:23:09 -05:00
dan 0c41b3188a
[Session] Remove global agent (#3852)
* Remove logs and outdated comments

* Move side effect upwards

* Pull refreshedAccount next to usage

* Simplify account refresh logic

* Extract setupPublicAgentState()

* Collapse setStates into one

* Ignore events from stale agents

* Use agent from state

* Remove clearCurrentAccount

* Move state to a reducer

* Remove global agent

* Fix stale agent reference in create flow

* Proceed to onboarding even if setting date fails

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-08 03:10:03 +01:00
Eric Bailey 31a8356aef
Handle invalid service URLs (#3908) 2024-05-07 21:09:02 -05:00
Eric Bailey 165fdb7049
[🐴] Integrate global event bus (#3904)
* Conditionally run global event bus

* Add current convo id context, bundle providers
2024-05-07 20:25:58 -05:00
Hailey 37f22ca224
fix privacy api type (#3903) 2024-05-07 16:35:04 -07:00
Eric Bailey b2b1c6c040
Let React app replace preload (#3900)
* Let React app replace preload

* Fix html structure

* Fix indent
2024-05-07 18:29:21 -05:00
Eric Bailey 53d844495b
Remove messages provider (#3902) 2024-05-07 18:29:06 -05:00
Eric Bailey f78126e01a
[🐴] State transitions (#3880)
* Handle init/resume/suspend/background and polling

* Add debug and temp guard

* Make state transitions sync

* Make init sync also

* Checkpoint: confusing but working state machine

* Reducer-esque

* Remove poll events

* Guard fetchConvo

(cherry picked from commit 8385579d31500bb4bfb60afeecdc1eb3ddd7e747)

* Clean up polling, make sync

(cherry picked from commit 7f75cd04c3bf81c94662785748698640a84bef51)

* Update history handling

(cherry picked from commit b82b552ba4040adf7ead2377541132a386964ff8)

* Check for screen focus in app state listener

* Get rid of ad-hoc status checks
2024-05-07 17:54:52 -05:00
Eric Bailey 87cb4c105e
[🐴] Global event mgmt (#3897)
* Add global event bus for messages logs

* Add rev to state

* Better handle error

* Clean up polling, add backgrounding

* Add trailConvo method

* Extend polling until we're ready for this
2024-05-07 17:54:34 -05:00
Paul Frazee 0625a914bd Run intl:extract 2024-05-07 14:15:34 -07:00
Hailey 4678c4353b
typo in if/else (#3899) 2024-05-07 13:17:40 -07:00
Hailey 0658dd053d
create new cache key on each run when saving previous commit hash (#3898)
* create new cache key on each run

* dynamic restore-key
2024-05-07 13:08:44 -07:00
Minseo Lee c6d30f671a
Remove unnecessary Trans tags (#3888) 2024-05-07 20:06:39 +01:00
Samuel Newman 7d72dfb1cb
[GIFs] Restore default alt text (#3893)
* 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>
2024-05-07 20:05:40 +01:00